Repository navigation
chore(wren-ai-service): fix historical question query input - #1064
Conversation
WalkthroughThe pull request introduces a subtle modification in the Changes
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)wren-ai-service/src/web/v1/services/ask.py (1)
You are passing user_query = ask_request.query if not rephrased_question else rephrased_questionIf the ✅ Verification successfulLet me gather more information about the usage of queries in the codebase. Use original query for historical question lookup Based on the code analysis, the current implementation is correct. The
This design allows the system to first check if the exact same question was asked before (using original query) before attempting to generate new SQL using the rephrased question. 🏁 Scripts executedThe following scripts were executed for the analysis: Error: No shell scripts found Script: #!/bin/bash
# Search for the context around the query usage
rg -B 10 -A 10 "query=ask_request.query" wren-ai-service/src/web/v1/services/ask.py
Length of output: 1865 Script: #!/bin/bash
# Search for rephrased_question usage
rg -B 5 -A 5 "rephrased_question" wren-ai-service/src/web/v1/services/ask.py
Length of output: 5577 Script: #!/bin/bash
# Search for historical_question pipeline usage
rg -B 5 -A 5 "historical_question" wren-ai-service/src/web/v1/services/ask.py
Length of output: 1907 🪧 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
Bug Fixes
Refactor