Skip to content

Oracle Cloud Generative AI Service API #17798

Closed Answered by dosubot bot
federicoquaranta40 asked this question in Q&A
Discussion options

You must be logged in to vote

To call the Oracle Generative AI Service API via LlamaIndex, you can use the OCIGenAI class from the llama_index.llms.oci_genai module. Here's how you can do it:

  1. Install Required Packages:
    Make sure you have the necessary packages installed:

    pip install llama-index-llms-oci-genai
    pip install -U oci
  2. Initialize the OCIGenAI Interface:
    Set up the OCIGenAI interface with your OCI endpoint, model ID, OCID, and authentication method.

    from llama_index.llms.oci_genai import OCIGenAI
    
    llm = OCIGenAI(
        model="MY_MODEL",
        service_endpoint="https://inference.generativeai.us-chicago-1.oci.oraclecloud.com",
        compartment_id="MY_OCID",
    )
  3. Call the API:
    Use the complete method to send a pro…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@federicoquaranta40
Comment options

@dosubot
Comment options

Answer selected by federicoquaranta40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant