Compare commits

..

4 Commits

Author SHA1 Message Date
Lorenze Jay
2d44356c81 Refine custom embedder configuration support
- Update custom embedder configuration method to handle custom embedding functions
- Modify type hints for embedder configuration
- Remove unused model_name parameter in custom embedder configuration
2025-02-07 13:41:36 -08:00
Lorenze Jay
d48211f7f8 added docs 2025-02-07 12:48:17 -08:00
Lorenze Jay
8eea0bd502 Merge branch 'main' of github.com:crewAIInc/crewAI into fix/embedder-config 2025-02-07 12:45:30 -08:00
Lorenze Jay
cafac13447 Enhance embedding configuration with custom embedder support
- Add support for custom embedding functions in EmbeddingConfigurator
- Update type hints for embedder configuration
- Extend configuration options for various embedding providers
- Add optional embedder configuration to Memory class
2025-02-07 12:41:57 -08:00

View File

@@ -463,32 +463,26 @@ Learn how to get the most out of your LLM configuration:
<Accordion title="Google">
```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=<your-api-key>
# Option 2: Vertex AI IAM credentials for Gemini, Anthropic, and Model Garden.
# Option 2. Vertex AI IAM credentials for Gemini, Anthropic, and anything in the Model Garden.
# https://cloud.google.com/vertex-ai/generative-ai/docs/overview
```
Get credentials:
```python Code
import json
## 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 the credentials to a JSON string
# Convert to 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,