Brandon/provide llm additional params (#2018)
Some checks failed
Mark stale issues and pull requests / stale (push) Has been cancelled

* Clean up to match enterprise

* add additional params to LLM calls

* make sure additional params are getting passed to llm

* update docs

* drop print
This commit is contained in:
Brandon Hancock (bhancock_ai)
2025-01-31 12:53:58 -05:00
committed by GitHub
parent ddb7958da7
commit 23b9e10323
3 changed files with 63 additions and 1 deletions

View File

@@ -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
)
```
</Accordion>