diff --git a/tests/conftest.py b/tests/conftest.py index 08ff7033..8cf0a391 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -235,7 +235,7 @@ def chat_client(search_config: SearchConfig, default_user2: KhojUser): OpenAIProcessorConversationConfigFactory() UserConversationProcessorConfigFactory(user=default_user2, setting=chat_model) - state.anonymous_mode = False + state.anonymous_mode = True app = FastAPI() @@ -253,7 +253,9 @@ def chat_client_no_background(search_config: SearchConfig, default_user2: KhojUs # Initialize Processor from Config if os.getenv("OPENAI_API_KEY"): + chat_model = ChatModelOptionsFactory(chat_model="gpt-3.5-turbo", model_type="openai") OpenAIProcessorConversationConfigFactory() + UserConversationProcessorConfigFactory(user=default_user2, setting=chat_model) state.anonymous_mode = True diff --git a/tests/test_openai_chat_director.py b/tests/test_openai_chat_director.py index 14a73f15..c7d2e0ec 100644 --- a/tests/test_openai_chat_director.py +++ b/tests/test_openai_chat_director.py @@ -307,6 +307,7 @@ def test_ask_for_clarification_if_not_enough_context_in_question(chat_client_no_ "which one is", "which of namita's sons", "the birth order", + "provide more context", ] assert response.status_code == 200 assert any([expected_response in response_message.lower() for expected_response in expected_responses]), (