View source: R/service-google.R
create_completion_google | R Documentation |
Generate text completions using Google AI Studio's API
create_completion_google(
prompt,
model = "gemini-pro",
key = Sys.getenv("GOOGLE_API_KEY")
)
prompt |
The prompt for generating completions |
model |
The model to use for generating text. By default, the function will try to use "text-bison-001" |
key |
The API key for accessing Google AI Studio's API. By default, the
function will try to use the |
A list with the generated completions and other information returned by the API.
## Not run:
create_completion_google(
prompt = "Write a story about a magic backpack",
temperature = 1.0,
candidate_count = 3
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.