gemini_docs.vertex | R Documentation |
Summarize, compare, or analyze the content of one or more documents (PDF, TXT, HTML, etc.) using Vertex AI Gemini.
gemini_docs.vertex(
file_uri,
prompt,
mime_type = "application/pdf",
tokens = NULL,
temperature = 1,
maxOutputTokens = 8192,
topK = 40,
topP = 0.95,
seed = 1234
)
file_uri |
The URI(s) or URL(s) of the file(s) to include in the prompt. Accepts Cloud Storage URI (gs://...), HTTP(S) URL, or YouTube video URL. |
prompt |
The text instructions to include in the prompt. |
mime_type |
The media type of the file (e.g., "application/pdf", "text/plain"). |
tokens |
A list containing the API URL and key from token.vertex() function. |
temperature |
The temperature to use. Default is 1. |
maxOutputTokens |
The maximum number of tokens to generate. Default is 8192. |
topK |
The top-k value to use. Default is 40. |
topP |
The top-p value to use. Default is 0.95. |
seed |
The seed to use. Default is 1234. |
The summary or response text from Gemini Vertex.
https://cloud.google.com/vertex-ai/docs/generative-ai/multimodal/send-request-document
## Not run:
tokens <- token.vertex()
gemini_docs.vertex(
file_uri = "gs://cloud-samples-data/generative-ai/pdf/2403.05530.pdf",
prompt = "Summarize this document.",
mime_type = "application/pdf",
tokens = tokens
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.