From 0062d134ecf161c9b751f908c657359362cc828a Mon Sep 17 00:00:00 2001 From: Brandon Hancock Date: Fri, 31 Jan 2025 12:40:09 -0500 Subject: [PATCH] update docs --- docs/concepts/llms.mdx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/concepts/llms.mdx b/docs/concepts/llms.mdx index 261a1fdd8..0358308f4 100644 --- a/docs/concepts/llms.mdx +++ b/docs/concepts/llms.mdx @@ -465,11 +465,22 @@ Learn how to get the most out of your LLM configuration: # https://cloud.google.com/vertex-ai/generative-ai/docs/overview ``` + ## GET CREDENTIALS + file_path = 'path/to/vertex_ai_service_account.json' + + # Load the JSON file + with open(file_path, 'r') as file: + vertex_credentials = json.load(file) + + # Convert to JSON string + vertex_credentials_json = json.dumps(vertex_credentials) + Example usage: ```python Code llm = LLM( model="gemini/gemini-1.5-pro-latest", - temperature=0.7 + temperature=0.7, + vertex_credentials=vertex_credentials_json ) ```