MicroFish/backend/app/services
octo-patch fe8949ca1c fix: handle string attributes in graph ontology to prevent TypeError crash (fixes #135)
When the LLM returns ontology attributes as plain strings instead of
dicts, set_ontology() crashes with "TypeError: string indices must be
integers, not 'str'" at attr_def["name"].

Two-layer fix:
1. ontology_generator.py: normalize string attrs to {"name", "type",
   "description"} dicts during validation, so downstream code always
   receives well-formed structures.
2. graph_builder.py: add isinstance guard as a safety net in
   set_ontology() for both entity and edge attribute loops.

Co-Authored-By: Octopus <liyuan851277048@icloud.com>
2026-04-26 11:29:26 +08:00
..
__init__.py Implement Interview feature for agent interactions in simulations 2025-12-08 15:55:39 +08:00
graph_builder.py fix: handle string attributes in graph ontology to prevent TypeError crash (fixes #135) 2026-04-26 11:29:26 +08:00
oasis_profile_generator.py feat(i18n): replace remaining Chinese in config generator and profile generator 2026-04-01 17:19:12 +08:00
ontology_generator.py fix: handle string attributes in graph ontology to prevent TypeError crash (fixes #135) 2026-04-26 11:29:26 +08:00
report_agent.py feat(i18n): replace all user-visible Chinese in report_agent.py 2026-04-01 17:44:52 +08:00
simulation_config_generator.py feat(i18n): replace remaining Chinese in config generator and profile generator 2026-04-01 17:19:12 +08:00
simulation_ipc.py Implement Interview feature for agent interactions in simulations 2025-12-08 15:55:39 +08:00
simulation_manager.py feat(i18n): replace remaining hardcoded Chinese in progress callbacks 2026-04-01 16:53:29 +08:00
simulation_runner.py fix(i18n): pass locale to background threads via thread-local storage 2026-04-01 16:55:51 +08:00
text_processor.py Introduce Project ID for context management, finalizing the stateful API pipeline from file submission to graph construction. 2025-11-28 17:21:08 +08:00
zep_entity_reader.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
zep_graph_memory_updater.py fix(i18n): pass locale to background threads via thread-local storage 2026-04-01 16:55:51 +08:00
zep_tools.py feat(i18n): replace all user-visible Chinese logger messages in zep_tools.py 2026-04-01 17:46:39 +08:00