fix(wren-ai-service): allow sql generation reasoning streaming in followup asking#1452
Conversation
WalkthroughThis pull request streamlines user queue handling in two SQL generation reasoning pipelines by condensing the initialization logic into a single line and modifying the control flow in result retrieval to yield an empty string when a queue is absent. Additionally, the AskService’s streaming result method now incorporates an asynchronous loop to process responses from a secondary pipeline during the "planning" status. No changes have been made to exported or public entities. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant AskService
participant SQLGenPipeline as SQLGenerationReasoning
participant FollowupPipeline as FollowUpSQLGenerationReasoning
Client->>AskService: Request ask result
AskService->>SQLGenPipeline: Initiate streaming (default flow)
SQLGenPipeline-->>AskService: Stream SQL reasoning results
opt When status is "planning"
AskService->>FollowupPipeline: Initiate streaming (followup flow)
FollowupPipeline-->>AskService: Stream followup reasoning results
end
AskService->>Client: Return aggregated streaming events
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (5)
🪧 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 (
|
Summary by CodeRabbit
New Features
Refactor