Commit graph

84 commits

Author SHA1 Message Date
5e206bdd84 Fix corrupted LLM-generated hour arrays in simulation config
The LLM sometimes generates arrays like [19202122] instead of
[19,20,21,22]. Add _sanitize_hours() to validate and fix these,
falling back to defaults when arrays contain single large numbers
or strings. Also add round-level debug logging.
2026-03-13 20:32:33 +07:00
0ff30457a0 Add debug logging and 5min timeout per round to prevent hangs 2026-03-13 20:23:59 +07:00
65d8524a9d Make simulation LLM concurrency configurable, default to 5
The hardcoded semaphore=30 caused Groq free tier to hang from
too many concurrent requests. Now reads from config.concurrency
with a safe default of 5.
2026-03-13 20:16:27 +07:00
c9c1f44711 Replace all Zep API calls in simulation endpoints with disk-first fallback
Extract shared helpers _load_disk_graph_data, _get_filtered_entities,
_get_entity_by_uuid that try local graph_data.json before falling back
to Zep Cloud API. Updates all 4 remaining Zep-dependent endpoints:
entity listing, entity detail, entities by type, and profile generation.
2026-03-13 19:53:24 +07:00
b17828807f Use disk-stored graph data for simulation prepare instead of Zep 2026-03-13 19:48:25 +07:00
49a86c622a Adjust relationship prompt to infer connections from character traits 2026-03-13 19:34:51 +07:00
10a85e76d6 Two-pass graph extraction: entities then relationships with larger chunks 2026-03-13 19:30:30 +07:00
e806898018 Fix Project object subscript error in graph data endpoint 2026-03-13 19:26:55 +07:00
e14080129e Fix str.format KeyError by using %-formatting for ontology JSON 2026-03-13 19:22:36 +07:00
b4c7f67b00 Add traceback logging for extraction errors 2026-03-13 19:19:22 +07:00
db6e235b98 Add logging to LLM graph builder for debugging extraction failures 2026-03-13 19:14:36 +07:00
79519ddd54 Replace Zep with direct LLM calls for graph building
Add LLMGraphBuilderService that extracts entities/relationships
from text chunks using Groq instead of Zep Cloud API. Graph data
is persisted to disk as graph_data.json, with fallback to Zep
for existing graphs.
2026-03-13 19:07:40 +07:00
8024cb130a Fix Groq API compatibility in parallel simulation
- Patch camel tool schema to add empty properties when required is
  present but properties is missing (fixes do_nothing tool rejection)
- Fix LLM-generated concatenated hour arrays in config loading
  (e.g. [19202122] -> [19,20,21,22])
2026-03-13 17:21:30 +07:00
42ab084edd Translate all backend LLM prompts and API messages to English 2026-03-13 02:47:30 +07:00
666ghj
985f89f49a fix: resolve 500 error caused by <think> tags and markdown code fences in content field from reasoning models like MiniMax/GLM 2026-03-06 00:30:31 +08:00
666ghj
da6548e96f feat(graph): implement pagination for fetching nodes and edges; add utility functions for streamlined data retrieval 2026-02-27 15:53:29 +08:00
666ghj
25aa4f75d2 fix(report_agent): refine tool call handling and response validation; enforce strict separation between tool calls and final answers 2026-02-24 17:47:44 +08:00
666ghj
08ec856a58 fix(report_agent): update max_agents parameter description and enforce maximum limit of 10 agents 2026-02-14 18:35:05 +08:00
666ghj
ddd9ff2479 feat(report_agent): update report language consistency guidelines; ensure all quoted content is translated to the report language for clarity 2026-02-14 18:24:03 +08:00
666ghj
7601d78fd4 feat(report_agent): enhance interview text processing and response handling; improve quote extraction and formatting for better clarity 2026-02-14 16:56:48 +08:00
666ghj
dc0a9261d1 feat(report_agent): add detailed tool descriptions and prompts for future prediction report generation 2026-02-14 15:16:17 +08:00
666ghj
d2041f6fb8 fix(report_agent): update description of insight_forge tool to remove "最强大" and enhance clarity 2026-02-14 14:48:23 +08:00
666ghj
0a59bace92 fix(report_agent): increase minimum tool call requirement from 2 to 3 per chapter and enhance user prompts to encourage diverse tool usage 2026-02-06 19:37:52 +08:00
666ghj
e004fe8f14 fix(report_agent): update tool call requirements in content generation to allow up to 5 tool calls per chapter and clarify user prompts for insufficient data 2026-02-06 18:34:19 +08:00
666ghj
f9abaf8e9f refactor(report_agent, Step4Report): simplify logging and remove subsection handling; update UI to reflect changes in section content generation 2026-02-06 18:13:30 +08:00
666ghj
54f1291967 fix(report_agent): handle None responses from LLM during content generation and enforce fallback behavior 2026-01-29 17:08:39 +08:00
666ghj
40f7035947 fix(config): enable overriding of environment variables when loading .env file 2026-01-23 16:20:24 +08:00
666ghj
390c120fef fix(file_parser): handle non-UTF-8 encoded text files with automatic encoding detection 2026-01-22 18:28:37 +08:00
666ghj
56b8babf17 feat(ZepGraphMemoryUpdater): add platform display name mapping and logging enhancements. 2026-01-16 09:00:10 +08:00
666ghj
e25d2e38f4 feat(SimulationAPI): add function to retrieve latest report ID for a given simulation
- Implemented `_get_report_id_for_simulation` to find the most recent report ID associated with a simulation ID by scanning the reports directory.
- Updated `get_simulation_history` to include the retrieved report ID in the response, enhancing the simulation data returned to the client.
2026-01-09 16:04:35 +08:00
666ghj
992f7d13c3 refactor(simulation): enhance simulation data retrieval and project file handling
- Updated simulation history retrieval to read project details directly from the Simulation file.
- Improved simulation configuration handling by reading simulation requirements from JSON.
- Added project file listing to the simulation history, displaying up to three associated files.
- Refined card layout in HistoryDatabase.vue to accommodate new file display features and improved responsiveness.
2026-01-07 18:54:33 +08:00
666ghj
e6da45ee63 feat(history): 添加首页历史项目展示组件
- 新增 HistoryDatabase.vue 组件,实现扇形堆叠到网格展开的动画效果
- 后端 simulation.py 添加历史模拟数据 API 支持
- 修复 SimulationManager 过滤隐藏文件问题
- 前端 simulation.js 添加获取历史模拟数据的 API 方法
- Home.vue 集成历史项目展示组件
- 实现正方形网格背景装饰效果
2025-12-31 17:54:39 +08:00
666ghj
4be144c3f2 Refactor process termination in SimulationRunner to support cross-platform handling and improve code clarity. Update development script to ensure concurrent processes are terminated correctly. 2025-12-30 17:45:27 +08:00
666ghj
8bd768718e Add SIGHUP signal handling in SimulationRunner for Unix systems 2025-12-30 15:28:26 +08:00
666ghj
067855f7b5 Add UTF-8 encoding support for Windows in simulation_runner.py and run_parallel_simulation.py to resolve character encoding issues with third-party libraries. 2025-12-26 18:14:57 +08:00
666ghj
f46c1a9ec7 Add UTF-8 encoding support for Windows console in run.py and logger.py to prevent character encoding issues 2025-12-26 17:58:48 +08:00
666ghj
4e96019e0d Change project license from Apache-2.0 to AGPL-3.0 in package.json, package-lock.json, and backend/pyproject.toml. 2025-12-22 16:41:45 +08:00
666ghj
a47eb1eaef Refactor project structure by removing Docker support and updating environment configuration
- Deleted docker-compose.yml, backend Dockerfile, frontend Dockerfile, and nginx configuration to streamline project setup.
- Updated .env.example to reorganize LLM and ZEP API configurations for clarity and ease of use.
- Enhanced README.md to reflect changes in project structure and provide clearer setup instructions.
2025-12-19 13:58:35 +08:00
666ghj
136843ada9 Initialize project with version 0.1.0 and update package configurations
- Created package-lock.json for dependency management.
- Updated package.json and frontend package.json to version 0.1.0.
- Adjusted backend pyproject.toml to reflect version 0.1.0.
- Introduced uv.lock for Python dependency resolution.
2025-12-18 18:30:29 +08:00
666ghj
97a64947d4 Update project license to Apache-2.0 in package.json, README.md, and pyproject.toml 2025-12-17 18:33:01 +08:00
666ghj
08688a892d Update project setup scripts and enhance README for clarity
- Modified the backend setup script to clear the virtual environment before installation.
- Improved README.md by restructuring the prerequisites section into a table for better readability.
- Added installation instructions for the `uv` package and clarified terminal requirements post-installation.
2025-12-17 18:26:09 +08:00
666ghj
e432e223df Update project configuration and structure with Docker support and environment variable adjustments
- Updated .env.example to reflect new LLM configuration with Aliyun's API.
- Enhanced .gitignore to include additional files and directories for better exclusion of sensitive and build artifacts.
- Added docker-compose.yml for streamlined deployment of backend and frontend services.
- Introduced Dockerfiles for both backend and frontend to facilitate containerized builds.
- Created README.md to provide comprehensive project documentation and setup instructions.
- Established nginx configuration for frontend to support API proxying and static file serving.
2025-12-17 18:17:40 +08:00
666ghj
99c1b199d5 Update ReportAgent to reduce maximum tool calls and iterations for improved efficiency
- Decreased the maximum tool calls per section from 8 to 5.
- Reduced the maximum iterations in the ReACT loop from 8 to 5, streamlining the report generation process.
2025-12-16 22:47:14 +08:00
666ghj
d096aa2b26 Remove outdated README.md and update favicon in index.html
- Deleted the backend README.md file as it was no longer needed.
- Changed the favicon from a SVG to a PNG format for better compatibility.
- Updated the page title in index.html to reflect a more concise branding message.
2025-12-16 20:58:48 +08:00
666ghj
cb47e9859c Update ReportAgent to enhance report retrieval and streamline tool call process
- Reduced maximum tool calls per chat from 5 to 2 for improved efficiency.
- Simplified system prompt to focus on concise responses and report content.
- Implemented report content retrieval with length limitation to prevent context overflow.
- Adjusted tool call execution to limit to one call per iteration, enhancing clarity in responses.
- Updated user message prompts to encourage concise answers based on retrieved data.
2025-12-16 17:59:34 +08:00
666ghj
0fa2363104 Update maximum limits for tool calls and iterations in ReportAgent class
- Increased the maximum tool calls per section from 4 to 8, enhancing the agent's capabilities.
- Raised the maximum reflection rounds from 2 to 3 to allow for deeper analysis.
- Adjusted the maximum tool calls per chat from 3 to 5 for improved interaction.
- Expanded the maximum agents for interviews from 5 to 20, facilitating more comprehensive data gathering.
- Increased the maximum iterations for ReACT loops from 5 to 8 and from 3 to 5 in different contexts, optimizing the report generation process.
2025-12-14 23:36:44 +08:00
666ghj
a097de4094 Enhance text output formatting and remove truncation in zep_tools.py
- Updated the `to_text` method in the `PanoramaResult` class to provide complete outputs for current facts, historical facts, and involved entities, improving data visibility.
- Modified the `to_text` method in the `AgentInterview` class to display the full agent bio without truncation.
- Adjusted the `ZepToolsService` class to retrieve all related entity details and facts without limiting the output, ensuring comprehensive data representation.
2025-12-14 22:41:46 +08:00
666ghj
9be2c28a5d Refactor report logging and enhance report generation features
- Renamed log_section_complete to log_section_content to better reflect its purpose, and added is_subsection parameter for improved logging of subsection content.
- Introduced log_section_full_complete method to log the completion of entire sections, including all subsections, enhancing tracking of report generation status.
- Adjusted maximum tool call limits for sections and chats to optimize performance during report generation.
- Updated system prompts and user prompts in the ReportAgent class to clarify the report's focus on future predictions rather than current analysis.
- Enhanced the Step3Simulation and Step4Report components for improved user experience, including UI updates and better handling of report generation states.
2025-12-14 03:28:41 +08:00
666ghj
fde79721e8 Enhance agent bio display and tool result presentation in Step4Report component
- Updated the AgentInterview class to display the full agent bio, truncating only if it exceeds 1000 characters for better readability.
- Enhanced the Step4Report component to include structured display for tool results, allowing users to toggle between raw and structured views for various tools, improving user experience and clarity.
- Introduced new components for parsing and displaying results from different tools, including InsightForge, PanoramaSearch, InterviewAgents, and QuickSearch, providing a comprehensive view of the data.
2025-12-14 01:29:57 +08:00
666ghj
b4435e273a Add report ID generation and logging features for report generation process
- Introduced a unique report ID generation mechanism to enhance tracking and management of reports.
- Implemented detailed logging for the report generation process, including agent actions, planning stages, and tool calls, improving traceability and debugging.
- Added new API endpoints for retrieving agent and console logs, allowing users to access detailed execution logs and console outputs during report generation.
- Enhanced the frontend GraphPanel component with a notification for users when simulations finish, improving user experience and feedback.
2025-12-13 21:11:14 +08:00