Skip to content

Commit a928cde

Browse files
fix: rag tool embeddings config
* fix: ensure config is not flattened, add tests * chore: refactor inits to model_validator * chore: refactor rag tool config parsing * chore: add initial docs * chore: add additional validation aliases for provider env vars * chore: add solid docs * chore: move imports to top * fix: revert circular import * fix: lazy import qdrant-client * fix: allow collection name config * chore: narrow model names for google * chore: update additional docs * chore: add backward compat on model name aliases * chore: add tests for config changes
1 parent 9c84475 commit a928cde

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1851
-292
lines changed

docs/en/concepts/knowledge.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ crew = Crew(
388388
agents=[sales_agent, tech_agent, support_agent],
389389
tasks=[...],
390390
embedder={ # Fallback embedder for agents without their own
391-
"provider": "google",
392-
"config": {"model": "text-embedding-004"}
391+
"provider": "google-generativeai",
392+
"config": {"model_name": "gemini-embedding-001"}
393393
}
394394
)
395395

@@ -629,9 +629,9 @@ agent = Agent(
629629
backstory="Expert researcher",
630630
knowledge_sources=[knowledge_source],
631631
embedder={
632-
"provider": "google",
632+
"provider": "google-generativeai",
633633
"config": {
634-
"model": "models/text-embedding-004",
634+
"model_name": "gemini-embedding-001",
635635
"api_key": "your-google-key"
636636
}
637637
}

docs/en/concepts/memory.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ crew = Crew(
341341
embedder={
342342
"provider": "openai",
343343
"config": {
344-
"model": "text-embedding-3-small" # or "text-embedding-3-large"
344+
"model_name": "text-embedding-3-small" # or "text-embedding-3-large"
345345
}
346346
}
347347
)
@@ -353,7 +353,7 @@ crew = Crew(
353353
"provider": "openai",
354354
"config": {
355355
"api_key": "your-openai-api-key", # Optional: override env var
356-
"model": "text-embedding-3-large",
356+
"model_name": "text-embedding-3-large",
357357
"dimensions": 1536, # Optional: reduce dimensions for smaller storage
358358
"organization_id": "your-org-id" # Optional: for organization accounts
359359
}
@@ -375,7 +375,7 @@ crew = Crew(
375375
"api_base": "https://your-resource.openai.azure.com/",
376376
"api_type": "azure",
377377
"api_version": "2023-05-15",
378-
"model": "text-embedding-3-small",
378+
"model_name": "text-embedding-3-small",
379379
"deployment_id": "your-deployment-name" # Azure deployment name
380380
}
381381
}
@@ -390,10 +390,10 @@ Use Google's text embedding models for integration with Google Cloud services.
390390
crew = Crew(
391391
memory=True,
392392
embedder={
393-
"provider": "google",
393+
"provider": "google-generativeai",
394394
"config": {
395395
"api_key": "your-google-api-key",
396-
"model": "text-embedding-004" # or "text-embedding-preview-0409"
396+
"model_name": "gemini-embedding-001" # or "text-embedding-005", "text-multilingual-embedding-002"
397397
}
398398
}
399399
)
@@ -461,7 +461,7 @@ crew = Crew(
461461
"provider": "cohere",
462462
"config": {
463463
"api_key": "your-cohere-api-key",
464-
"model": "embed-english-v3.0" # or "embed-multilingual-v3.0"
464+
"model_name": "embed-english-v3.0" # or "embed-multilingual-v3.0"
465465
}
466466
}
467467
)
@@ -478,7 +478,7 @@ crew = Crew(
478478
"provider": "voyageai",
479479
"config": {
480480
"api_key": "your-voyage-api-key",
481-
"model": "voyage-large-2", # or "voyage-code-2" for code
481+
"model": "voyage-3", # or "voyage-3-lite", "voyage-code-3"
482482
"input_type": "document" # or "query"
483483
}
484484
}
@@ -912,10 +912,10 @@ crew = Crew(
912912
crew = Crew(
913913
memory=True,
914914
embedder={
915-
"provider": "google",
915+
"provider": "google-generativeai",
916916
"config": {
917917
"api_key": "your-api-key",
918-
"model": "text-embedding-004"
918+
"model_name": "gemini-embedding-001"
919919
}
920920
}
921921
)

0 commit comments

Comments
 (0)