diff --git a/kairon/shared/vector_embeddings/db/qdrant.py b/kairon/shared/vector_embeddings/db/qdrant.py index dbf83afec..b4b92ece3 100644 --- a/kairon/shared/vector_embeddings/db/qdrant.py +++ b/kairon/shared/vector_embeddings/db/qdrant.py @@ -45,7 +45,9 @@ async def perform_operation(self, data: Dict, user: str, **kwargs): request.update(**payload) if request: - request.update(**{'with_payload': True, 'limit': 10}) + request.update(**{'with_payload': True}) + if 'limit' not in request: + request['limit'] = 10 result = ActionUtility.execute_http_request(http_url=url, request_method='POST', request_body=request) diff --git a/metadata/integrations.yml b/metadata/integrations.yml index 9b8097e66..59da86111 100644 --- a/metadata/integrations.yml +++ b/metadata/integrations.yml @@ -114,7 +114,7 @@ llm: description: "The max_tokens hyperparameter limits the length of generated responses in chat completion using ChatGPT." model: type: string - default: "gpt-3.5-turbo" + default: "gpt-4o-mini" enum: ["gpt-3.5-turbo", "gpt-3.5-turbo-instruct", "gpt-4o-mini"] description: "The model hyperparameter is the ID of the model to use such as gpt-2, gpt-3, or a custom model that you have trained or fine-tuned." top_p: diff --git a/template/use-cases/Hi-Hello-GPT/actions.yml b/template/use-cases/Hi-Hello-GPT/actions.yml index 81a2d0017..66f1359a4 100644 --- a/template/use-cases/Hi-Hello-GPT/actions.yml +++ b/template/use-cases/Hi-Hello-GPT/actions.yml @@ -18,7 +18,7 @@ prompt_action: frequency_penalty: 0 logit_bias: {} max_tokens: 300 - model: gpt-3.5-turbo + model: gpt-4o-mini n: 1 presence_penalty: 0 stop: null diff --git a/tests/integration_test/action_service_test.py b/tests/integration_test/action_service_test.py index 7c1f2677d..283ab2fbb 100644 --- a/tests/integration_test/action_service_test.py +++ b/tests/integration_test/action_service_test.py @@ -11478,7 +11478,7 @@ def test_prompt_action_response_action_with_prompt_question_from_slot(mock_searc 'content': "\nInstructions on how to use Similarity Prompt:\n['Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically typed and garbage-collected.']\nAnswer question based on the context above, if answer is not in the context go check previous logs.\n \nQ: What kind of language is python? \nA:"}], 'metadata': {'user': 'udit.pandey', 'bot': '5f50fd0a56b698ca10d35d2l', 'invocation': 'prompt_action'}, 'api_key': 'keyvalue', - 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args[1], expected, ignore_order=True) @@ -11547,7 +11547,7 @@ def test_prompt_action_response_action_with_bot_responses(mock_search, mock_embe 'content': "\nInstructions on how to use Similarity Prompt:\n['Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically typed and garbage-collected.']\nAnswer question based on the context above, if answer is not in the context go check previous logs.\n \nQ: What kind of language is python? \nA:"}], 'metadata': {'user': 'udit.pandey', 'bot': '5f50fd0a56b698ca10d35d2k', 'invocation': 'prompt_action'}, 'api_key': 'keyvalue', - 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args[1], expected, ignore_order=True) @@ -11619,7 +11619,7 @@ def test_prompt_action_response_action_with_bot_responses_with_instructions(mock 'content': "\nInstructions on how to use Similarity Prompt:\n['Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically typed and garbage-collected.']\nAnswer question based on the context above, if answer is not in the context go check previous logs.\n \nAnswer in a short way.\nKeep it simple. \nQ: What kind of language is python? \nA:"}], 'metadata': {'user': 'udit.pandey', 'bot': '5f50fd0a56b678ca10d35d2k', 'invocation': 'prompt_action'}, 'api_key': 'keyvalue', - 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args[1], expected, ignore_order=True) @@ -11842,7 +11842,7 @@ def test_prompt_response_action_streaming_enabled(mock_search, mock_embedding, m } ] hyperparameters = {'temperature': 0.0, 'max_tokens': 300, - 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stream': True, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} @@ -11876,7 +11876,7 @@ def test_prompt_response_action_streaming_enabled(mock_search, mock_embedding, m 'content': "\nInstructions on how to use Similarity Prompt:\n['Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically typed and garbage-collected.']\nAnswer question based on the context above.\n \nQ: What kind of language is python? \nA:"}], 'metadata': {'user': 'udit.pandeyy', 'bot': '5f50k90a56b698ca10d35d2e', 'invocation': 'prompt_action'}, 'api_key': 'keyvalue', - 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stream': True, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args.kwargs, expected, ignore_order=True) @@ -12154,7 +12154,7 @@ def __mock_fetch_similar(*args, **kwargs): 'raw_completion_response': {'choices': [{'message': { 'content': 'Python is dynamically typed, garbage-collected, high level, general purpose programming.', 'role': 'assistant'}}]}, 'type': 'answer_query', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}}] excludedRegex = [ @@ -12166,7 +12166,7 @@ def __mock_fetch_similar(*args, **kwargs): 'content': "Python Prompt:\nA programming language is a system of notation for writing computer programs.[1] Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.\nInstructions on how to use Python Prompt:\nAnswer according to the context\n\nJava Prompt:\nJava is a programming language and computing platform first released by Sun Microsystems in 1995.\nInstructions on how to use Java Prompt:\nAnswer according to the context\n\nAction Prompt:\nPython is a scripting language because it uses an interpreter to translate and run its code.\nInstructions on how to use Action Prompt:\nAnswer according to the context\n\n\nInstructions on how to use Similarity Prompt:\n['Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically typed and garbage-collected.']\nAnswer question based on the context above, if answer is not in the context go check previous logs.\n \nQ: What kind of language is python? \nA:"}], 'metadata': {'user': 'nupur.khare', 'bot': '5u08kd0a56b698ca10d98e6s', 'invocation': 'prompt_action'}, 'api_key': 'keyvalue', - 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args[1], expected, ignore_order=True) @@ -12244,7 +12244,7 @@ def mock_completion_for_answer(*args, **kwargs): 'raw_completion_response': {'choices': [{'message': { 'content': 'Kanban is a workflow management tool which visualizes both the process (the workflow) and the actual work passing through that process.', 'role': 'assistant'}}]}, 'type': 'answer_query', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}}] @@ -12257,7 +12257,7 @@ def mock_completion_for_answer(*args, **kwargs): 'content': 'Google search Prompt:\nKanban visualizes both the process (the workflow) and the actual work passing through that process.\nTo know more, please visit: Kanban\n\nKanban project management is one of the emerging PM methodologies, and the Kanban approach is suitable for every team and goal.\nTo know more, please visit: Kanban Project management\n\nKanban is a popular framework used to implement agile and DevOps software development.\nTo know more, please visit: Kanban agile\nInstructions on how to use Google search Prompt:\nAnswer according to the context\n\n \nQ: What is kanban \nA:'}], 'metadata': {'user': 'test_user', 'bot': '5u08kd0a56b698ca10hgjgjkhgjks', 'invocation': 'prompt_action'}, 'api_key': 'keyvalue', - 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args[1], expected, ignore_order=True) @@ -12375,7 +12375,7 @@ def __mock_fetch_similar(*args, **kwargs): 'raw_completion_response': {'choices': [{'message': { 'content': 'Python is dynamically typed, garbage-collected, high level, general purpose programming.', 'role': 'assistant'}}]}, 'type': 'answer_query', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}}] excludedRegex = [ @@ -12387,7 +12387,7 @@ def __mock_fetch_similar(*args, **kwargs): 'content': "Language Prompt:\nPython is an interpreted, object-oriented, high-level programming language with dynamic semantics.\nInstructions on how to use Language Prompt:\nAnswer according to the context\n\n\nInstructions on how to use Similarity Prompt:\n['Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically typed and garbage-collected.']\nAnswer question based on the context above, if answer is not in the context go check previous logs.\n \nQ: What is the name of prompt? \nA:"}], 'metadata': {'user': 'udit.pandey', 'bot': '5u80fd0a56c908ca10d35d2sjhj', 'invocation': 'prompt_action'}, 'api_key': 'keyvalue', - 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args[1], expected, ignore_order=True) @@ -12488,7 +12488,7 @@ def mock_completion_for_answer(*args, **kwargs): 'raw_completion_response': {'choices': [{'message': { 'content': '{"api_type": "filter", {"filter": {"must": [{"key": "Date Added", "match": {"value": 1673721000.0}}]}}}', 'role': 'assistant'}}]}, 'type': 'answer_query', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}}] excludedRegex = [ @@ -12500,7 +12500,7 @@ def mock_completion_for_answer(*args, **kwargs): 'content': 'Qdrant Prompt:\nConvert user questions into json requests in qdrant such that they will either filter, apply range queries and search the payload in qdrant. Sample payload present in qdrant looks like below with each of the points starting with 1 to 5 is a record in qdrant.1. {"Category (Risk, Issue, Action Item)": "Risk", "Date Added": 1673721000.0,2. {"Category (Risk, Issue, Action Item)": "Action Item", "Date Added": 1673721000.0,For eg: to find category of record created on 15/01/2023, the filter query is:{"filter": {"must": [{"key": "Date Added", "match": {"value": 1673721000.0}}]}}\nInstructions on how to use Qdrant Prompt:\nCreate qdrant filter query out of user message based on above instructions.\n\n \nQ: category of record created on 15/01/2023? \nA:'}], 'metadata': {'user': 'udit.pandey', 'bot': '5u80fd0a56c908ca10d35d2sjhjhjhj', 'invocation': 'prompt_action'}, 'api_key': 'keyvalue', - 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args[1], expected, ignore_order=True) @@ -12592,7 +12592,7 @@ def __mock_fetch_similar(*args, **kwargs): 'raw_completion_response': {'choices': [{'message': { 'content': 'Python is dynamically typed, garbage-collected, high level, general purpose programming.', 'role': 'assistant'}}]}, 'type': 'answer_query', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}}] excludedRegex = [ @@ -12604,7 +12604,7 @@ def __mock_fetch_similar(*args, **kwargs): 'content': "Language Prompt:\nPython is an interpreted, object-oriented, high-level programming language with dynamic semantics.\nInstructions on how to use Language Prompt:\nAnswer according to the context\n\n\nInstructions on how to use Similarity Prompt:\n['Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically typed and garbage-collected.']\nAnswer question based on the context above, if answer is not in the context go check previous logs.\n \nQ: What is the name of prompt? \nA:"}], 'metadata': {'user': 'udit.pandey', 'bot': '5u80fd0a56c908ca10d35d2s', 'invocation': 'prompt_action'}, 'api_key': 'keyvalue', - 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args[1], expected, ignore_order=True) @@ -12669,7 +12669,7 @@ def __mock_fetch_similar(*args, **kwargs): expected = {'messages': [{'role': 'system', 'content': 'You are a personal assistant.\n'}, {'role': 'user', 'content': "\nInstructions on how to use Similarity Prompt:\n['Scrum teams using Kanban as a visual management tool can get work delivered faster and more often. Prioritized tasks are completed first as the team collectively decides what is best using visual cues from the Kanban board. The best part is that Scrum teams can use Kanban and Scrum at the same time.']\nAnswer question based on the context above, if answer is not in the context go check previous logs.\n \nQ: Kanban And Scrum Together? \nA:"}], 'metadata': {'user': user, 'bot': bot, 'invocation': 'prompt_action'}, 'api_key': value, - 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args[1], expected, ignore_order=True) @@ -12734,7 +12734,7 @@ def test_prompt_action_response_action_when_similarity_is_empty(mock_search, moc {'role': 'user', 'content': 'hello'}, {'role': 'assistant', 'content': 'how are you'}, {'role': 'user', 'content': ' \nQ: What kind of language is python? \nA:'}], 'metadata': {'user': 'udit.pandey', 'bot': bot, 'invocation': 'prompt_action'}, 'api_key': value, - 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args[1], expected, ignore_order=True) @@ -12802,7 +12802,7 @@ def test_prompt_action_response_action_when_similarity_disabled(mock_search, moc {'role': 'user', 'content': 'hello'}, {'role': 'assistant', 'content': 'how are you'}, {'role': 'user', 'content': ' \nQ: What kind of language is python? \nA:'}], 'metadata': {'user': user, 'bot': bot, 'invocation': 'prompt_action'}, 'api_key': value, - 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args[1], expected, ignore_order=True) diff --git a/tests/integration_test/services_test.py b/tests/integration_test/services_test.py index fa4624a00..fb488404a 100644 --- a/tests/integration_test/services_test.py +++ b/tests/integration_test/services_test.py @@ -4840,7 +4840,7 @@ def test_get_prompt_action(): {'name': 'test_update_prompt_action', 'num_bot_responses': 5, 'failure_message': 'updated_failure_message', 'user_question': {'type': 'from_slot', 'value': 'prompt_question'}, 'llm_type': 'openai', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, 'llm_prompts': [ {'name': 'System Prompt', 'data': 'You are a personal assistant.', 'type': 'system', 'source': 'static', @@ -4935,7 +4935,7 @@ def _mock_get_bot_settings(*args, **kwargs): 'failure_message': "I'm sorry, I didn't quite understand that. Could you rephrase?", 'user_question': {'type': 'from_user_message'}, 'llm_type': 'openai', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, 'llm_prompts': [{'name': 'System Prompt', 'data': 'You are a personal assistant.', 'type': 'system', @@ -5027,7 +5027,7 @@ def _mock_get_bot_settings(*args, **kwargs): 'failure_message': "I'm sorry, I didn't quite understand that. Could you rephrase?", 'user_question': {'type': 'from_user_message'}, 'llm_type': 'openai', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, 'llm_prompts': [{'name': 'System Prompt', 'data': 'You are a personal assistant.', 'type': 'system', @@ -5122,7 +5122,7 @@ def _mock_get_bot_settings(*args, **kwargs): 'failure_message': "I'm sorry, I didn't quite understand that. Could you rephrase?", 'user_question': {'type': 'from_user_message'}, 'llm_type': 'openai', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, 'llm_prompts': [{'name': 'System Prompt', 'data': 'You are a personal assistant.', 'type': 'system', @@ -24975,7 +24975,7 @@ def test_get_llm_logs(): expected = "Hi, How may i help you?" result = loop.run_until_complete(litellm.acompletion(messages=messages, - model="gpt-3.5-turbo", + model="gpt-4o-mini", mock_response=expected, metadata={'user': user, 'bot': pytest.bot})) assert result['choices'][0]['message']['content'] == expected diff --git a/tests/unit_test/action/action_test.py b/tests/unit_test/action/action_test.py index ce2e7f067..e0f10d57f 100644 --- a/tests/unit_test/action/action_test.py +++ b/tests/unit_test/action/action_test.py @@ -2662,7 +2662,7 @@ def test_get_prompt_action_config(self): assert actual_config == {'name': 'kairon_faq_action', 'num_bot_responses': 5, 'failure_message': "I'm sorry, I didn't quite understand that. Could you rephrase?", 'user_question': {'type': 'from_user_message'}, 'bot': 'test_action_server', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -3956,7 +3956,7 @@ def test_get_prompt_action_config_2(self): 'user_question': {'type': 'from_user_message'}, 'failure_message': "I'm sorry, I didn't quite understand that. Could you rephrase?", 'bot': 'test_bot_action_test', 'user': 'test_user_action_test', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, 'dispatch_response': True, 'set_slots': [], diff --git a/tests/unit_test/data_processor/data_processor_test.py b/tests/unit_test/data_processor/data_processor_test.py index 82962e3aa..ce7fabf73 100644 --- a/tests/unit_test/data_processor/data_processor_test.py +++ b/tests/unit_test/data_processor/data_processor_test.py @@ -169,7 +169,7 @@ def test_add_prompt_action_with_invalid_slots(self): BotSettings(bot=bot, user=user, llm_settings=LLMSettings(enable_faq=True)).save() request = {'name': 'test_add_prompt_action_with_invalid_slots', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -197,7 +197,7 @@ def test_add_prompt_action_with_invalid_http_action(self): BotSettings(bot=bot, user=user, llm_settings=LLMSettings(enable_faq=True)).save() request = {'name': 'test_add_prompt_action_with_invalid_http_action', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -226,7 +226,7 @@ def test_add_prompt_action_with_invalid_similarity_threshold(self): BotSettings(bot=bot, user=user, llm_settings=LLMSettings(enable_faq=True)).save() request = {'name': 'test_prompt_action_similarity', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -256,7 +256,7 @@ def test_add_prompt_action_with_invalid_top_results(self): user = 'test_user' request = {'name': 'test_prompt_action_invalid_top_results', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -320,7 +320,7 @@ def test_add_prompt_action_with_empty_collection_for_bot_content_prompt(self): 'num_bot_responses': 5, 'failure_message': "I'm sorry, I didn't quite understand that. Could you rephrase?", 'user_question': {'type': 'from_user_message'}, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, 'llm_type': 'openai', @@ -365,7 +365,7 @@ def test_add_prompt_action_with_bot_content_prompt(self): 'num_bot_responses': 5, 'failure_message': "I'm sorry, I didn't quite understand that. Could you rephrase?", 'user_question': {'type': 'from_user_message'}, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, 'llm_type': 'openai', @@ -564,7 +564,7 @@ def test_add_prompt_action_with_empty_llm_prompts(self): user = 'test_user' request = {'name': 'test_add_prompt_action_with_empty_llm_prompts', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -592,7 +592,7 @@ def test_add_prompt_action_faq_action_with_default_values_and_instructions(self) assert not DeepDiff(action, [{'name': 'test_add_prompt_action_faq_action_with_default_values', 'num_bot_responses': 5, 'failure_message': "I'm sorry, I didn't quite understand that. Could you rephrase?", 'user_question': {'type': 'from_slot', 'value': 'prompt_question'}, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, 'llm_type': 'openai', @@ -612,7 +612,7 @@ def test_add_prompt_action_with_invalid_temperature_hyperparameter(self): BotSettings(bot=bot, user=user, llm_settings=LLMSettings(enable_faq=True)).save() request = {'name': 'test_add_prompt_action_with_invalid_temperature_hyperparameter', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 3.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 3.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -629,7 +629,7 @@ def test_add_prompt_action_with_invalid_stop_hyperparameter(self): BotSettings(bot=bot, user=user, llm_settings=LLMSettings(enable_faq=True)).save() request = {'name': 'test_add_prompt_action_with_invalid_stop_hyperparameter', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': ["\n", ".", "?", "!", ";"], 'presence_penalty': 0.0, @@ -649,7 +649,7 @@ def test_add_prompt_action_with_invalid_presence_penalty_hyperparameter(self): request = {'name': 'test_add_prompt_action_with_invalid_presence_penalty_hyperparameter', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': '?', 'presence_penalty': -3.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -667,7 +667,7 @@ def test_add_prompt_action_with_invalid_frequency_penalty_hyperparameter(self): request = {'name': 'test_add_prompt_action_with_invalid_frequency_penalty_hyperparameter', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': '?', 'presence_penalty': 0.0, 'frequency_penalty': 3.0, 'logit_bias': {}}, @@ -684,7 +684,7 @@ def test_add_prompt_action_with_invalid_max_tokens_hyperparameter(self): BotSettings(bot=bot, user=user, llm_settings=LLMSettings(enable_faq=True)).save() request = {'name': 'test_add_prompt_action_with_invalid_max_tokens_hyperparameter', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 2, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 2, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': '?', 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -701,7 +701,7 @@ def test_add_prompt_action_with_zero_max_tokens_hyperparameter(self): BotSettings(bot=bot, user=user, llm_settings=LLMSettings(enable_faq=True)).save() request = {'name': 'test_add_prompt_action_with_zero_max_tokens_hyperparameter', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 0, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 0, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': '?', 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -718,7 +718,7 @@ def test_add_prompt_action_with_invalid_top_p_hyperparameter(self): BotSettings(bot=bot, user=user, llm_settings=LLMSettings(enable_faq=True)).save() request = {'name': 'test_add_prompt_action_with_invalid_top_p_hyperparameter', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 256, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 256, 'model': 'gpt-4o-mini', 'top_p': 3.0, 'n': 1, 'stop': '?', 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -735,7 +735,7 @@ def test_add_prompt_action_with_invalid_n_hyperparameter(self): BotSettings(bot=bot, user=user, llm_settings=LLMSettings(enable_faq=True)).save() request = {'name': 'test_add_prompt_action_with_invalid_n_hyperparameter', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 200, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 200, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 7, 'stop': '?', 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -752,7 +752,7 @@ def test_add_prompt_action_with_zero_n_hyperparameter(self): BotSettings(bot=bot, user=user, llm_settings=LLMSettings(enable_faq=True)).save() request = {'name': 'test_add_prompt_action_with_zero_n_hyperparameter', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 200, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 200, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 0, 'stop': '?', 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, @@ -769,7 +769,7 @@ def test_add_prompt_action_with_invalid_logit_bias_hyperparameter(self): BotSettings(bot=bot, user=user, llm_settings=LLMSettings(enable_faq=True)).save() request = {'name': 'test_add_prompt_action_with_invalid_logit_bias_hyperparameter', 'num_bot_responses': 5, 'failure_message': DEFAULT_NLU_FALLBACK_RESPONSE, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 200, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 200, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 2, 'stop': '?', 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': 'a'}, @@ -845,7 +845,7 @@ def test_edit_prompt_action_faq_action(self): action[0].pop("_id") assert not DeepDiff(action, [{'name': 'test_edit_prompt_action_faq_action', 'num_bot_responses': 5, 'failure_message': 'updated_failure_message', 'user_question': {'type': 'from_user_message'}, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, 'llm_type': 'openai', @@ -880,7 +880,7 @@ def test_edit_prompt_action_faq_action(self): 'failure_message': "I'm sorry, I didn't quite understand that. Could you rephrase?", 'user_question': {'type': 'from_slot', 'value': 'prompt_question'}, 'llm_type': 'openai', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, 'llm_prompts': [ @@ -913,7 +913,7 @@ def test_edit_prompt_action_with_less_hyperparameters(self): "use_query_prompt": True, "use_bot_responses": True, "query_prompt": "updated_query_prompt", "num_bot_responses": 5, "hyperparameters": {"temperature": 0.0, "max_tokens": 300, - "model": "gpt-3.5-turbo", + "model": "gpt-4o-mini", "top_p": 0.0, "n": 1}} @@ -923,7 +923,7 @@ def test_edit_prompt_action_with_less_hyperparameters(self): assert not DeepDiff(action, [{'name': 'test_edit_prompt_action_with_less_hyperparameters', 'num_bot_responses': 5, 'failure_message': 'updated_failure_message', 'user_question': {'type': 'from_slot', 'value': 'prompt_question'}, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, 'llm_type': 'openai', @@ -958,7 +958,7 @@ def test_get_prompt_faq_action(self): assert not DeepDiff(action, [{'name': 'test_edit_prompt_action_with_less_hyperparameters', 'num_bot_responses': 5, 'failure_message': 'updated_failure_message', 'user_question': {'type': 'from_slot', 'value': 'prompt_question'}, - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}, 'llm_type': 'openai', diff --git a/tests/unit_test/llm_test.py b/tests/unit_test/llm_test.py index 4f9b40126..8c57bc650 100644 --- a/tests/unit_test/llm_test.py +++ b/tests/unit_test/llm_test.py @@ -667,7 +667,7 @@ async def test_gpt3_faq_embedding_predict_with_values(self, mock_embedding, mock 'created': 1720090690, 'model': None, 'object': 'chat.completion', 'system_fingerprint': None, 'usage': {}}, 'type': 'answer_query', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}}] @@ -762,7 +762,7 @@ async def test_gpt3_faq_embedding_predict_with_values_and_stream(self, mock_embe 'created': 1720090691, 'model': None, 'object': 'chat.completion', 'system_fingerprint': None, 'usage': {}}, 'type': 'answer_query', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}, 'stream': True}}] @@ -870,7 +870,7 @@ async def test_gpt3_faq_embedding_predict_with_values_with_instructions(self, 'model': None, 'object': 'chat.completion', 'system_fingerprint': None, 'usage': {}}, 'type': 'answer_query', - 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', + 'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}}}], ignore_order=True) @@ -957,7 +957,7 @@ def __mock_connection_error(*args, **kwargs): 'content': "Based on below context answer question, if answer not in context check previous logs.\nInstructions on how to use Similarity Prompt:\n['Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically typed and garbage-collected.']\nAnswer according to this context.\n \nQ: What kind of language is python? \nA:"}], 'metadata': {'user': 'test', 'bot': 'test_gpt3_faq_embedding_predict_completion_connection_error', 'invocation': None}, 'api_key': 'test', 'num_retries': 3, 'temperature': 0.0, 'max_tokens': 300, - 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, 'stop': None, + 'model': 'gpt-4o-mini', 'top_p': 0.0, 'n': 1, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, 'logit_bias': {}} assert not DeepDiff(mock_completion.call_args[1], expected, ignore_order=True) @@ -1200,19 +1200,19 @@ async def test_llm_logging(self): expected = "Hi, How may i help you?" result = await litellm.acompletion(messages=messages, - model="gpt-3.5-turbo", + model="gpt-4o-mini", mock_response=expected, metadata={'user': user, 'bot': bot, 'invocation': None}) assert result['choices'][0]['message']['content'] == expected result = litellm.completion(messages=messages, - model="gpt-3.5-turbo", + model="gpt-4o-mini", mock_response=expected, metadata={'user': user, 'bot': bot, 'invocation': None}) assert result['choices'][0]['message']['content'] == expected result = litellm.completion(messages=messages, - model="gpt-3.5-turbo", + model="gpt-4o-mini", mock_response=expected, stream=True, metadata={'user': user, 'bot': bot, 'invocation': None}) @@ -1225,7 +1225,7 @@ async def test_llm_logging(self): assert response == expected result = await litellm.acompletion(messages=messages, - model="gpt-3.5-turbo", + model="gpt-4o-mini", mock_response=expected, stream=True, metadata={'user': user, 'bot': bot, 'invocation': None}) @@ -1239,7 +1239,7 @@ async def test_llm_logging(self): with pytest.raises(Exception) as e: await litellm.acompletion(messages=messages, - model="gpt-3.5-turbo", + model="gpt-4o-mini", mock_response=Exception("Authentication error"), metadata={'user': user, 'bot': bot, 'invocation': None}) @@ -1247,7 +1247,7 @@ async def test_llm_logging(self): with pytest.raises(Exception) as e: litellm.completion(messages=messages, - model="gpt-3.5-turbo", + model="gpt-4o-mini", mock_response=Exception("Authentication error"), metadata={'user': user, 'bot': bot, 'invocation': None}) @@ -1255,7 +1255,7 @@ async def test_llm_logging(self): with pytest.raises(Exception) as e: await litellm.acompletion(messages=messages, - model="gpt-3.5-turbo", + model="gpt-4o-mini", mock_response=Exception("Authentication error"), stream=True, metadata={'user': user, 'bot': bot, 'invocation': None}) diff --git a/tests/unit_test/utility_test.py b/tests/unit_test/utility_test.py index 5fa44f128..2318278b1 100644 --- a/tests/unit_test/utility_test.py +++ b/tests/unit_test/utility_test.py @@ -2958,7 +2958,7 @@ def test_get_llm_hyperparameters(self): assert hyperparameters == { "temperature": 0.0, "max_tokens": 300, - "model": "gpt-3.5-turbo", + "model": "gpt-4o-mini", "top_p": 0.0, "n": 1, "stop": None,