From 2f3e5e0803f72238c5ba3e3b3e326f4185eebf0c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:42:50 +0000 Subject: [PATCH] test: Add embedder_config to knowledge source tests Co-Authored-By: Joe Moura --- tests/agent_test.py | 12 ++++++++++++ tests/utilities/test_knowledge_planning.py | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/agent_test.py b/tests/agent_test.py index d429a3c60..58ead958f 100644 --- a/tests/agent_test.py +++ b/tests/agent_test.py @@ -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( diff --git a/tests/utilities/test_knowledge_planning.py b/tests/utilities/test_knowledge_planning.py index 37b6df69f..d09a9b994 100644 --- a/tests/utilities/test_knowledge_planning.py +++ b/tests/utilities/test_knowledge_planning.py @@ -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