chore(wren-ai-service): minor updates#1503
Conversation
WalkthroughThis pull request updates the SQL reasoning plan instructions and refines the control flow in streaming functions and ask service methods. The changes modify the output formatting for reasoning steps by introducing numbered steps with bold titles and specifying prefixes for table and column names. Additionally, the logic for handling missing query IDs in streaming functions now creates a new asyncio queue rather than yielding an empty result. A new base response model is also introduced to manage follow-up queries and user guidance in the ask service. Changes
Sequence Diagram(s)sequenceDiagram
participant C as Caller
participant SC as Streaming Callback
participant UQ as User Queue
C->>SC: Invoke _streaming_callback with query_id
alt query_id not in _user_queues
SC->>UQ: Initialize new asyncio.Queue
Note right of SC: Continue processing
else
SC->>SC: Process request normally
end
sequenceDiagram
participant Client as Client
participant AS as Ask Service
participant P as Pipeline
Client->>AS: Send ask request
AS->>AS: Check request history (set is_followup flag)
alt is_followup true
AS->>P: Route to follow-up pipeline
else
AS->>P: Route to primary pipeline
end
P-->>AS: Return streaming result
AS-->>Client: Deliver AskResultResponse
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (5)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary by CodeRabbit
New Features
Refactor