Chat in OCI Generative AI

Use the provided large language chat models in OCI Generative AI to ask questions and get conversational responses through an AI chatbot.

    1. In the navigation bar of the Console, select a region with Generative AI, for example, US Midwest (Chicago). If you don't know which region to select, see the region for each pretrained model.
    2. Open the navigation menu and click Analytics & AI. Under AI Services, click Generative AI.
    3. Select a compartment that you have permission to work in. If you don't see the playground, ask an administrator to give you access to Generative AI resources and then return to the following steps.
    4. Click Playground.
    5. Click Chat.
    6. Select a model for the chat experience by performing one of the following actions:
      • In the Model list, choose a model such as meta.llama-3-70b-instruct, cohere.command-r-plus, cohere.command-r-16k, or a custom model. The custom models are displayed as model name (endpoint name).
      • Click View model details, select a model and then click Choose model.
    7. Start a conversation by typing a prompt or selecting an example from the Example list to use as a base prompt or to learn from.
    8. (Optional) Set new values for the parameters. For parameter details, see Chat Model Parameters.
    9. Click Submit.
    10. Enter a new prompt or to continue your chat conversation, enter a follow-up prompt and click Submit.
    11. (Optional) To change the responses, click Clear chat, update the prompts and parameters, and click Submit. Repeat this step until you're happy with the output.
    12. (Optional) To copy the code that generated the output, click View code, select a programming language, click Copy code, paste the code into a file and save the file. Ensure that the file maintains the format of the pasted code.
      Tip

      If you're using the code in an application, ensure that you authenticate your code.
    13. (Optional) To start a new conversation, click Clear chat.
      Note

      When you click Clear chat or select another feature such as Generation and then revisit the Chat playground, the chat conversation clears and the model parameters reset to their default values. See Cohere chat parameters.
  • To chat, use the chat-result operation in Generative AI Inference CLI.

    Enter the following command for a list of options to use with the chat-result operation.

    oci generative-ai-inference chat-result -h

    For a complete list of parameters and values for the OCIGenerative AI CLI commands, see Generative AI Inference CLI and Generative AI Management CLI.

  • Run the Chat operation documented in Generative AI Inference API.

    For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.