MicroFish/backend/app/utils
Md_Mushfiqur Rahim 0a3272197b fix: remove response_format=json_object from chat_json, increase ontology max_tokens
Bug 1: chat_json() was passing response_format={'type': 'json_object'}
to the LLM, which enforces JSON grammar from token 0. Reasoning
models (Qwen3, DeepSeek-R1, etc.) generate <think>...</think> blocks
before JSON output, causing garbled results. The fix removes the
response_format parameter since the system prompt already requests
JSON output and the existing <think> cleanup handles any remaining
tags.

Bug 2: ontology_generator hardcoded max_tokens=4096, causing
truncation for models with larger context windows. Increased to
16384 to accommodate reasoning model outputs.

Fixes #642
2026-05-27 02:36:58 +00:00
..
__init__.py fix(i18n): pass locale to background threads via thread-local storage 2026-04-01 16:55:51 +08:00
file_parser.py refactor: add type hints and FileParser.is_supported() helper 2026-05-23 14:57:46 +08:00
llm_client.py fix: remove response_format=json_object from chat_json, increase ontology max_tokens 2026-05-27 02:36:58 +00:00
locale.py fix(i18n): validate Accept-Language header against registered locales 2026-04-02 14:20:15 +08:00
logger.py refactor: add type hints and FileParser.is_supported() helper 2026-05-23 14:57:46 +08:00
retry.py Enhance backend functionality with OASIS simulation features 2025-12-01 15:03:44 +08:00
zep_paging.py feat(graph): implement pagination for fetching nodes and edges; add utility functions for streamlined data retrieval 2026-02-27 15:53:29 +08:00