WeKnora/internal/models/chat
wizardchen d38a6efd87 refactor(agent): remove final_answer tool references and update related logic
- Eliminated all instances of the final_answer tool from the agent's configuration and logic, transitioning to a model where the agent concludes responses with plain text instead.
- Updated event handling and response analysis to reflect this change, ensuring that the agent's output is now directly delivered as text without relying on a dedicated final answer tool.
- Adjusted localization strings across multiple languages to remove references to final_answer, enhancing clarity and consistency in user-facing messages.
- Improved the overall structure of the agent's response handling to streamline the process and reduce potential confusion regarding tool usage.

refactor(agent): streamline answer handling and preamble logic

- Updated the agent's response handling to treat any text streamed before a tool call as a preamble, ensuring it is not included in the final answer.
- Removed the superseded marker logic from the event emission process, simplifying the flow of answer content and enhancing clarity in the UI.
- Adjusted the event handling to ensure that preamble segments are correctly retracted and relocated into the steps tree, improving the overall user experience.
- Enhanced the agent's internal logic to better manage answer segments and their states during streaming, leading to a more coherent response structure.
2026-06-04 15:48:04 +08:00
..
anthropic.go fix: support Anthropic gateway streaming 2026-05-13 00:14:23 +08:00
anthropic_test.go fix: support Anthropic gateway streaming 2026-05-13 00:14:23 +08:00
chat.go fix(agent): pass reasoning_content back to providers that require it 2026-05-13 12:29:10 +08:00
chat_provider_spec.go refactor: Simplify WeKnoraCloud request customization and message conversion 2026-04-23 17:52:43 +08:00
config_from_model_test.go feat(models): support custom HTTP headers across all remote model calls 2026-04-23 23:36:40 +08:00
image_resolve.go feat(chat): implement local image resolver for multimodal chat 2026-06-01 20:54:37 +08:00
json_field_extractor.go feat: implement final_answer tool and enhance agent duration tracking 2026-03-09 11:46:56 +08:00
json_field_extractor_test.go feat: implement final_answer tool and enhance agent duration tracking 2026-03-09 11:46:56 +08:00
langfuse_wrapper.go feat(tests): add unit tests for Langfuse wrapper functions 2026-06-04 15:48:04 +08:00
langfuse_wrapper_test.go feat(tests): add unit tests for Langfuse wrapper functions 2026-06-04 15:48:04 +08:00
llm_debug.go feat(logger): implement LLM debug logging functionality 2026-04-16 23:15:02 +08:00
llm_debug_wrapper.go feat(logger): implement LLM debug logging functionality 2026-04-16 23:15:02 +08:00
ollama.go refactor(agent): remove final_answer tool references and update related logic 2026-06-04 15:48:04 +08:00
remote_api.go refactor(agent): remove final_answer tool references and update related logic 2026-06-04 15:48:04 +08:00
remote_api_test.go feat(chat): surface cached prompt tokens from upstream usage 2026-05-25 16:47:14 +08:00
sse_reader.go fix: ReadEvent incompatible sse data format 2026-04-20 22:29:38 +08:00
stream_raw_dump.go refactor(agent): remove final_answer tool references and update related logic 2026-06-04 15:48:04 +08:00
timeout_test.go fix(chat): LLM 兜底超时仅在上层无 deadline 时生效,并修复 ChatStream raw HTTP 路径的 cancel 泄漏 2026-05-10 00:16:12 +08:00