-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added user_question embedded field in PromptAction data_object with t…
…ype and value and fixed test cases.
- Loading branch information
1 parent
88c2fe6
commit b1f0130
Showing
8 changed files
with
57 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2036,7 +2036,7 @@ def _mock_get_bot_settings(*args, **kwargs): | |
return BotSettings(bot=pytest.bot, user="[email protected]", llm_settings=LLMSettings(enable_faq=True)) | ||
|
||
monkeypatch.setattr(MongoProcessor, 'get_bot_settings', _mock_get_bot_settings) | ||
action = {'name': 'test_add_prompt_action', 'prompt_question': 'from_user_message', | ||
action = {'name': 'test_add_prompt_action', 'user_question': {'type': 'from_user_message'}, | ||
'llm_prompts': [{'name': 'System Prompt', 'data': 'You are a personal assistant.', 'type': 'system', | ||
'source': 'static', 'is_enabled': True}, | ||
{'name': 'Similarity Prompt', | ||
|
@@ -2268,7 +2268,7 @@ def test_update_prompt_action_with_query_prompt_with_false(): | |
|
||
|
||
def test_update_prompt_action(): | ||
action = {'name': 'test_update_prompt_action', 'prompt_question': 'from_slot', | ||
action = {'name': 'test_update_prompt_action', 'user_question': {'type': 'from_slot', 'value': 'prompt_question'}, | ||
'llm_prompts': [{'name': 'System Prompt', 'data': 'You are a personal assistant.', 'type': 'system', | ||
'source': 'static', 'is_enabled': True}, | ||
{'name': 'Similarity_analytical Prompt', | ||
|
@@ -2311,7 +2311,7 @@ def test_get_prompt_action(): | |
assert actual["data"] == [ | ||
{'name': 'test_update_prompt_action', 'num_bot_responses': 5, 'top_results': 9, 'similarity_threshold': 0.5, | ||
'enable_response_cache': False, 'failure_message': 'updated_failure_message', | ||
'prompt_question': 'from_slot', | ||
'user_question': {'type': 'from_slot', 'value': 'prompt_question'}, | ||
'hyperparameters': {'temperature': 0.0, 'max_tokens': 300, 'model': 'gpt-3.5-turbo', 'top_p': 0.0, 'n': 1, | ||
'stream': False, 'stop': None, 'presence_penalty': 0.0, 'frequency_penalty': 0.0, | ||
'logit_bias': {}}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters