Learn R Programming

gemini.R (version 0.8.0)

gemini.vertex: Generate text from text with Gemini Vertex API

Description

Generate text from text with Gemini Vertex API

Usage

gemini.vertex(prompt = NULL, tokens = NULL)

Value

#' A character string containing the generated text.

Arguments

prompt

A character string containing the prompt for the Gemini model.

tokens

A list containing the API URL and key from token.vertex() function.

See Also

https://ai.google.dev/docs/gemini_api_overview#text_input

Examples

Run this code
if (FALSE) {
# token should be created before this. using the token.vertex() function
prompt <- "What is sachins Jersey number?"
gemini.vertex(prompt, tokens)
}

Run the code above in your browser using DataLab