-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(wren-ai-service): minor updates #1326
Conversation
WalkthroughThis pull request updates several configuration example files by enhancing their instructional comments. The new comments guide users on configuring their custom LLM and embedding models, using the proper pipe definitions from a specified URL, and correctly filling in models. The azure configuration file additionally instructs users to rename and move the file to a specific directory. Additionally, the intent classification module now includes a new Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant IC as IntentClassification
U->>IC: Provide input (question & output language)
IC->>IC: Call prompt(..., language)
IC->>IC: Generate reasoning and rephrase question in specified language
IC->>U: Return language-consistent output
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
wren-ai-service/src/pipelines/generation/intent_classification.py (2)
40-41
: Add language validation.The new requirements enforce language consistency, which aligns with the PR objective. However, consider adding validation to ensure the language parameter is a valid ISO language code.
- The reasoning of the intent classification MUST use the same language as the Output Language from the user input. - The rephrased user's question MUST use the same language as the Output Language from the user input. +- The Output Language from the user input MUST be a valid ISO 639-1 language code (e.g., 'en' for English, 'es' for Spanish).
230-230
: Add type hints for the language parameter.The language parameter is correctly passed to the prompt builder, but consider adding type hints in the Configuration class to ensure type safety.
# In Configuration class language: str = Field(description="ISO 639-1 language code for output")
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
wren-ai-service/docs/config_examples/config.azure.yaml
(1 hunks)wren-ai-service/docs/config_examples/config.deepseek.yaml
(1 hunks)wren-ai-service/docs/config_examples/config.google_ai_studio.yaml
(1 hunks)wren-ai-service/docs/config_examples/config.groq.yaml
(1 hunks)wren-ai-service/docs/config_examples/config.ollama.yaml
(1 hunks)wren-ai-service/src/pipelines/generation/intent_classification.py
(3 hunks)
✅ Files skipped from review due to trivial changes (1)
- wren-ai-service/docs/config_examples/config.azure.yaml
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: pytest
🔇 Additional comments (5)
wren-ai-service/src/pipelines/generation/intent_classification.py (1)
110-110
: LGTM!The language parameter is correctly integrated into the prompt template.
wren-ai-service/docs/config_examples/config.ollama.yaml (1)
2-5
: Enhanced Instruction ClarityThe updated comments clearly outline the three mandatory steps for setting up the configuration. This detailed guidance (using your own LLM/embedding models, referring to the correct pipe definitions via the provided URL, and ensuring the correct models are specified) will help users avoid configuration mistakes and improve the overall setup experience.
wren-ai-service/docs/config_examples/config.groq.yaml (1)
2-5
: Clear and Consistent Setup InstructionsThe revised header comments now provide explicit, step-by-step directions for the configuration process. They mirror the clarity seen in the other configuration examples, thereby ensuring users have a consistent experience when setting up the system.
wren-ai-service/docs/config_examples/config.google_ai_studio.yaml (1)
3-6
: Detailed Setup Guidance and Version ReminderThe new instructional comments clearly enumerate the three essential steps—using personal LLM/embedding models, referring to the correct pipe definitions via the provided URL, and filling in the appropriate models. Additionally, the reminder to upgrade the service version (line 1) is a helpful prompt to ensure compatibility.
wren-ai-service/docs/config_examples/config.deepseek.yaml (1)
2-5
: Improved Instructional Comments for ClarityThe enhanced comments now delineate a three-step process for adjusting the configuration, which is consistent with the changes in the other config files. This structured approach should greatly assist users in setting up their LLM and embedding models correctly.
Summary by CodeRabbit
Documentation
New Features