Question 1mediummultiple choice
Read the full Using OCI Generative AI Service explanation →1Z0-1127 Using OCI Generative AI Service • Complete Question Bank
Complete 1Z0-1127 Using OCI Generative AI Service question bank — all 0 questions with answers and detailed explanations.
{
"model": "cohere.command-light",
"compartmentId": "ocid1.compartment.oc1..aaaa...",
"messages": [
{"role": "user", "content": "Hello"}
],
"parameters": {
"temperature": 0.5,
"maxTokens": 100
}
}{
"status": 400,
"code": "InvalidParameter",
"message": "The model 'cohere.command-light' is not supported in region 'us-phoenix-1'."
}{
"data": [
{"id": "ocid1.generativeaimodel.oc1..aaaa...", "display-name": "cohere.command", "lifecycle-state": "ACTIVE", "time-created": "2024-01-01T00:00:00Z"},
{"id": "ocid1.generativeaimodel.oc1..bbbb...", "display-name": "cohere.command-light", "lifecycle-state": "INACTIVE", "time-created": "2024-01-02T00:00:00Z"},
{"id": "ocid1.generativeaimodel.oc1..cccc...", "display-name": "cohere.embed-english-v3.0", "lifecycle-state": "ACTIVE"}
]
}Policy JSON:
```json
{
"statements": [
"Allow group DataScientists to use generative-ai-inference in compartment ABC",
"Allow group DataScientists to use generative-ai-models in compartment ABC"
]
}
``````python from langchain_community.llms import OCIGenAI from langchain_community.embeddings import OCIGenAIEmbeddings from langchain.vectorstores import FAISS texts = ["Customer A query", "Customer B query"] embedding_model = OCIGenAIEmbeddings(model="cohere.embed-v3", ...) vector_store = FAISS.from_texts(texts, embedding_model) llm = OCIGenAI(model="cohere.command-r", ...) ```
Refer to the exhibit.
{
"syntaxVersion": "1.0",
"statements": [
{
"effect": "Allow",
"action": ["ai:generate-text"],
"resource": ["ocid1.generativemodel.oc1..aaaaaa..."]
}
]
}Refer to the exhibit.
Error:
{
"code": "InvalidParameter",
"message": "The parameter 'top_p' should be between 0 and 1.",
"status": 400
}```json
{
"statements": [
"Allow group GenAIUsers to read generative-ai-models in tenancy"
]
}
```Architecture: - User -> API Gateway -> OCI Generative AI Service (Cohere Command Model) - API Gateway has a custom authorizer that validates JWT tokens. - The Generative AI service endpoint is private, accessible only from the VCN.