From 74a1de8550b1da51be93f9a0ab2020f710d8b173 Mon Sep 17 00:00:00 2001 From: "Brandon Hancock (bhancock_ai)" <109994880+bhancockio@users.noreply.github.com> Date: Fri, 7 Feb 2025 16:58:13 -0500 Subject: [PATCH] clean up google docs (#2061) --- docs/concepts/llms.mdx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/concepts/llms.mdx b/docs/concepts/llms.mdx index b6a3ac328..117face04 100644 --- a/docs/concepts/llms.mdx +++ b/docs/concepts/llms.mdx @@ -463,26 +463,32 @@ Learn how to get the most out of your LLM configuration: ```python Code - # Option 1. Gemini accessed with an API key. + # Option 1: Gemini accessed with an API key. # https://ai.google.dev/gemini-api/docs/api-key GEMINI_API_KEY= - # Option 2. Vertex AI IAM credentials for Gemini, Anthropic, and anything in the Model Garden. + # Option 2: Vertex AI IAM credentials for Gemini, Anthropic, and Model Garden. # https://cloud.google.com/vertex-ai/generative-ai/docs/overview ``` - ## GET CREDENTIALS + Get credentials: + ```python Code + import json + 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 + # Convert the credentials to a JSON string vertex_credentials_json = json.dumps(vertex_credentials) + ``` Example usage: ```python Code + from crewai import LLM + llm = LLM( model="gemini/gemini-1.5-pro-latest", temperature=0.7,