
Generate Text in Generative AI

Generate Text in Generative AI
Use the large language generation models in in OCI
Generative AI to generate text or extract
 information from text.
ConsoleCLIAPI
In the navigation bar of the Console, select a region with Generative AI, for example, US Midwest
 (Chicago) or UK South (London). See which models are offered in your
 region.
Open the navigation menu and click Analytics & AI. Under AI Services, click Generative AI.
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.
Click Playground.
Click Generation.
Select a model for text generation by performing one of the following actions:
In the Model list, select a model such as
 cohere.command, cohere.command-light,
 meta.llama-2-70b-chat, 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.
Either enter a prompt or select an example from the Example list
 to use as a base prompt or to learn from.
(Optional) 
 Set new values for the parameters. For parameter details, see Generation Model Parameters.
 Note For cohere.command models, if you select Show
 likelihoods, after the model generates a response, you can hover the mouse
 over the generated words to see the tokens and their likelihood.
Click Generate.
(Optional) 
 To change the output, update the prompts and parameters and click
 Generate. Repeat this step until you're happy with the
 output.
 Note To maintain the context of prior prompts for follow-up questions, click
 Copy output and include the output in your next prompt. 
To copy the generated output for your use, click Copy
 output.
The output is copied to your computer clipboard.
(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.
(Optional) 
 To start a new prompt, click Clear under the
 Input area.
 Note When you click Clear the model parameters reset to their
 default values.
To generate text, use the generate-text-result operation.
Enter the following command for a list of options to generate text.
oci generative-ai-inference generate-text-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 GenerateText operation to generate text.
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.
