3891aae7fe
Refactor api_server.py to import environment setup and schema loading from bootstrap.py, enhancing modularity. Introduce a new function in Text2SQLOrchestrator to prioritize VCUserAccessibleFunction in table selection, improving SQL generation accuracy. Update validation logic to enforce restrictions on CJK characters in SQL string literals, ensuring compliance with business rules. Enhance prompts to clarify SQL generation constraints regarding date conditions and CJK usage.
main
陈辅元2026-04-17 15:15:01 +08:00
bcb9a205fa
Refactor SSE streaming behavior in api_server.py to optimize data transmission by reducing redundant ApiEnvelope in dual mode. Update documentation to clarify streaming shapes and their respective behaviors, ensuring better alignment with client expectations. Enhance handling of stage deltas and improve overall response structure for SQL generation phases.
陈辅元2026-04-17 09:58:08 +08:00
161b380e3a
Enhance SQL streaming and response handling in api_server.py by introducing new optional fields in NLChatSuccessData for SQL and explanation. Refactor _chat_stream_events to support multiple streaming shapes and improve response structure. Remove deprecated SqlExecuteBody class and streamline SSE data generation for better clarity and performance.
陈辅元2026-04-17 09:07:51 +08:00
4ee0ad2eec
Refine SQL output formatting in prompts to enforce pure text SQL without Markdown code fences. Allow inline comments using -- and update few-shot selector to reflect these changes in output presentation. Enhance clarity on SQL output requirements for better adherence to standards.
陈辅元2026-04-16 16:40:22 +08:00
f492e29749
Refactor _chat_stream_events in api_server.py to standardize SSE response format by removing additional status codes and consolidating output into a unified JSON structure. Update logging to enhance clarity on streaming events and improve error handling. Adjust documentation to reflect changes in event data structure.
陈辅元2026-04-16 16:26:58 +08:00
70c8e90f2e
Update environment configuration to switch OpenAI model from gpt-5.4 to gpt-4o-mini. Introduce _effective_llm_route_from_request function in api_server.py to determine the effective LLM routing based on service keys and model compatibility. Update chat event handling to include LLM routing information in response data. Enhance logging for better traceability of API interactions.
陈辅元2026-04-16 15:49:03 +08:00
be15b512a4
Update requirements.txt to streamline dependencies by removing comments and consolidating sections. Ensure compatibility with core libraries and maintain version constraints for improved package management.
陈辅元2026-04-16 14:41:18 +08:00
205ee96e0c
Refactor SQL streaming behavior in API server to default to LLM native delta transmission without secondary splitting. Update NLChatRequest to clarify optional parameters for SQL stream granularity and streaming throttle. Adjust _sse_stream_text_chunks and _chat_stream_events methods to streamline content handling and improve performance. Revise impact analysis documentation to reflect these changes.
陈辅元2026-04-16 14:29:24 +08:00
bff5f85d60
Enhance SQL generation and streaming capabilities in the API server. Introduce optional parameters for streaming throttle and SQL stream granularity in NLChatRequest. Implement new functions for iterating SQL generation content pieces and adjusting streaming behavior based on user-defined settings. Update prompts for few-shot SQL adaptation and improve logging for SQL generation processes. Refactor orchestrator methods to support streaming responses and integrate few-shot SQL conditions. Update impact analysis documentation to reflect these changes.
陈辅元2026-04-16 13:48:44 +08:00
df33657099
Enhance LLM integration by adding OpenAI client support and enabling dynamic routing between DeepSeek and OpenAI services. Update environment configuration to include LLM_SERVICE_CODE for service selection, and modify API server to accommodate new request parameters for language and model. Implement streaming response improvements for chat interactions, allowing for segmented SSE output. Update documentation and impact analysis to reflect these changes.
陈辅元2026-04-16 09:15:01 +08:00
85ad31348e
Implement follow-up detection in dialog context to prevent context pollution in multi-topic conversations. Introduce is_likely_follow_up function to determine when to inject session history based on user input. Adjust _load_session_text2sql_context to conditionally include context based on follow-up status, enhancing SQL generation accuracy. Update relevant API endpoints to pass user text for improved context handling.
陈辅元2026-04-15 17:33:07 +08:00
a55fd18915
Enhance impact analysis and configuration for vector persistence and API integration. Update main.spec to clarify data handling for ChromaDB, ensuring vector directories are excluded from packaging. Modify Text2SQLOrchestrator to unify question normalization for consistent SQL generation across languages. Introduce SchemaIndexer improvements for persistent vector storage and optimize embedding retrieval processes. Update documentation and comments for clarity on configuration changes and behavior adjustments.
陈辅元2026-04-15 11:25:19 +08:00
2d0b1ab36f
Refactor embedding configuration to remove local model support, transitioning to a unified remote API approach. Update environment variables and documentation accordingly. Enhance error handling in the orchestrator and related modules to reflect these changes. This update simplifies the embedding process and improves overall system reliability.
陈辅元2026-04-15 09:49:18 +08:00
4ea3056e95
Enhance environment configuration and error handling in API server and backend. Implement dynamic loading of .env files for various execution contexts, improve schema file path resolution, and refine vector search error handling in the orchestrator. Update ChromaDB integration to support memory mode and add persistence options for few-shot learning. Include additional logging for better traceability.
lasean.zhou2026-04-14 18:21:50 +08:00
ca8bc5e7de
Enhance dialog context handling for Text2SQL queries by integrating session history. Introduce new methods for summarizing previous assistant messages and determining if the last interaction was a data query. Update environment configuration for embedding options and improve error handling in SQL generation. Add user-facing delivery messages for successful SQL execution. This update supports more coherent follow-up questions and improves user experience in conversational interactions.
陈辅元2026-04-14 18:02:12 +08:00