Skip to content

Commit 47f1023

Browse files
evan-onyxtim-dim
authored andcommitted
fix claude bug (onyx-dot-app#4493)
* fix claude bug * fixed tests
1 parent 2c5f7f0 commit 47f1023

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

backend/onyx/chat/tool_handling/tool_response_handler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ def get_tool_call_for_non_tool_calling_llm_impl(
165165
user_query = prompt_builder.raw_user_query
166166
history = prompt_builder.raw_message_history
167167
if isinstance(prompt_builder, AnswerPromptBuilder):
168-
user_query = prompt_builder.get_user_message_content()
169168
history = prompt_builder.get_message_history()
170169

171170
if force_use_tool.force_use:

backend/tests/unit/onyx/chat/test_answer.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -323,14 +323,10 @@ def test_answer_with_search_no_tool_calling(
323323
== mock_search_tool.build_next_prompt.return_value.build.return_value
324324
)
325325

326-
user_message = (
327-
answer_instance.graph_inputs.prompt_builder.get_user_message_content()
328-
)
329-
330326
prev_messages = answer_instance.graph_inputs.prompt_builder.get_message_history()
331327
# Verify that get_args_for_non_tool_calling_llm was called on the mock_search_tool
332328
mock_search_tool.get_args_for_non_tool_calling_llm.assert_called_once_with(
333-
user_message, prev_messages, answer_instance.graph_config.tooling.primary_llm
329+
QUERY, prev_messages, answer_instance.graph_config.tooling.primary_llm
334330
)
335331

336332
# Verify that the search tool's run method was called

0 commit comments

Comments
 (0)