mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Fix openai chat actor, director tests
- Update test ChatModelOptions setup since update to it's schema - Fix stale function calls using their updated signatures
This commit is contained in:
@@ -516,7 +516,7 @@ async def test_get_correct_tools_online(chat_client):
|
||||
user_query = "What's the weather in Patagonia this week?"
|
||||
|
||||
# Act
|
||||
tools = await aget_relevant_information_sources(user_query, {})
|
||||
tools = await aget_relevant_information_sources(user_query, {}, False)
|
||||
|
||||
# Assert
|
||||
tools = [tool.value for tool in tools]
|
||||
@@ -531,7 +531,7 @@ async def test_get_correct_tools_notes(chat_client):
|
||||
user_query = "Where did I go for my first battleship training?"
|
||||
|
||||
# Act
|
||||
tools = await aget_relevant_information_sources(user_query, {})
|
||||
tools = await aget_relevant_information_sources(user_query, {}, False)
|
||||
|
||||
# Assert
|
||||
tools = [tool.value for tool in tools]
|
||||
@@ -546,7 +546,7 @@ async def test_get_correct_tools_online_or_general_and_notes(chat_client):
|
||||
user_query = "What's the highest point in Patagonia and have I been there?"
|
||||
|
||||
# Act
|
||||
tools = await aget_relevant_information_sources(user_query, {})
|
||||
tools = await aget_relevant_information_sources(user_query, {}, False)
|
||||
|
||||
# Assert
|
||||
tools = [tool.value for tool in tools]
|
||||
@@ -563,7 +563,7 @@ async def test_get_correct_tools_general(chat_client):
|
||||
user_query = "How many noble gases are there?"
|
||||
|
||||
# Act
|
||||
tools = await aget_relevant_information_sources(user_query, {})
|
||||
tools = await aget_relevant_information_sources(user_query, {}, False)
|
||||
|
||||
# Assert
|
||||
tools = [tool.value for tool in tools]
|
||||
@@ -587,7 +587,7 @@ async def test_get_correct_tools_with_chat_history(chat_client):
|
||||
chat_history = generate_history(chat_log)
|
||||
|
||||
# Act
|
||||
tools = await aget_relevant_information_sources(user_query, chat_history)
|
||||
tools = await aget_relevant_information_sources(user_query, chat_history, False)
|
||||
|
||||
# Assert
|
||||
tools = [tool.value for tool in tools]
|
||||
|
||||
Reference in New Issue
Block a user