fix(wren-ui): fix language for generate question for SQL pairs#1453
Conversation
WalkthroughThis pull request updates the API request construction for generating questions across two services. In the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant WrenAIAdaptor
participant API_Server
Client->>WrenAIAdaptor: Call generateQuestions(request)
WrenAIAdaptor->>WrenAIAdaptor: Build request payload with `configurations`
WrenAIAdaptor->>API_Server: Send payload to API endpoint
API_Server-->>WrenAIAdaptor: Response
WrenAIAdaptor-->>Client: Return generated questions
sequenceDiagram
participant Client
participant SqlPairService
participant EnumChecker
Client->>SqlPairService: Call generateQuestions(project)
SqlPairService->>EnumChecker: Validate project.language against WrenAILanguage enum
alt Valid Language
EnumChecker-->>SqlPairService: Return valid language
else Invalid Language
EnumChecker-->>SqlPairService: Return default `WrenAILanguage.EN`
end
SqlPairService->>SqlPairService: Build request payload with updated language in configurations
SqlPairService-->>Client: Return generated questions
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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 (
|
Description
SqlPairServiceto useWrenAILanguage[project.language]UI (manual testing)
Summary by CodeRabbit