mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 23:58:34 +00:00
test: Add embedder_config to knowledge source tests
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -1596,6 +1596,12 @@ def test_agent_with_knowledge_sources():
|
||||
backstory="You have access to specific knowledge sources.",
|
||||
llm=LLM(model="gpt-4o-mini"),
|
||||
knowledge_sources=[string_source],
|
||||
embedder_config={
|
||||
"provider": "openai",
|
||||
"config": {
|
||||
"api_key": "fake-api-key"
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
# Create a task that requires the agent to use the knowledge
|
||||
@@ -1631,6 +1637,12 @@ def test_agent_with_knowledge_sources_works_with_copy():
|
||||
backstory="You have access to specific knowledge sources.",
|
||||
llm=LLM(model="gpt-4o-mini"),
|
||||
knowledge_sources=[string_source],
|
||||
embedder_config={
|
||||
"provider": "openai",
|
||||
"config": {
|
||||
"api_key": "fake-api-key"
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
with patch(
|
||||
|
||||
@@ -45,7 +45,13 @@ def test_knowledge_included_in_planning(mock_chroma):
|
||||
StringKnowledgeSource(
|
||||
content="AI systems require careful training and validation."
|
||||
)
|
||||
]
|
||||
],
|
||||
embedder_config={
|
||||
"provider": "openai",
|
||||
"config": {
|
||||
"api_key": "fake-api-key"
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
# Create a task for the agent
|
||||
|
||||
Reference in New Issue
Block a user