Skip to content

chore(wren-ai-service): minor updates#1280

Merged
paopa merged 2 commits into
mainfrom
chore/ai-service/minor-updates
Feb 10, 2025
Merged

chore(wren-ai-service): minor updates#1280
paopa merged 2 commits into
mainfrom
chore/ai-service/minor-updates

Conversation

@cyyeh
Copy link
Copy Markdown
Member

@cyyeh cyyeh commented Feb 10, 2025

Summary by CodeRabbit

  • Documentation
    • Refined configuration examples by localizing timeout settings to individual models and standardizing model parameters and output formats across various AI service integrations.
  • Tests
    • Expanded support by introducing a new "stripe" use case option for additional dataset integration.

@cyyeh cyyeh added module/ai-service ai-service related ci/ai-service ai-service related labels Feb 10, 2025
@cyyeh cyyeh requested a review from paopa February 10, 2025 04:55
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 10, 2025

Walkthrough

This pull request updates several configuration files for the Wren AI service by refining timeout settings and model parameters. Global timeout values have been localized to specific model configurations (e.g., azure/gpt-4, groq/llama-3.3-70b-specdec), and new timeout and kwargs settings have been added in multiple config files. In addition, the deepseek configuration has been updated to reorder model names, adjust response format, and remove certain API base entries. A new "stripe" use case has also been added in the test suite to enable support for the bigquery dataset.

Changes

Files Change Summary
wren-ai-service/.../config.azure.yaml, wren-ai-service/.../config.groq.yaml Moved global timeout (120) to a model-specific configuration for llm (azure/gpt-4 and groq/llama-3.3-70b-specdec respectively)
wren-ai-service/.../config.deepseek.yaml Reordered model names; added timeout: 120 for each model; updated response_format (for deepseek-coder) and removed api_base entries
wren-ai-service/.../config.google_ai_studio.yaml Added timeout: 120 to LLM and embedder models; updated kwargs for gemini/gemini-2.0-flash-exp to include response_format: json_object, n, and temperature
wren-ai-service/.../config.ollama.yaml Increased timeout values from 120 to 600 seconds for both llm and embedder model configurations
wren-ai-service/.../test_usecases.py Introduced a new "stripe" use case by adding it to the usecase_to_dataset_type mapping and argument parser choices

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant A as Argument Parser
    participant P as Usecase Processor
    participant D as Dataset Loader

    U->>A: Input usecases including "stripe"
    A->>P: Parse and validate usecase options
    P->>D: Map "stripe" to "bigquery" dataset
    D-->>P: Return dataset configuration
    P-->>U: Process usecase with loaded dataset
Loading

Possibly related PRs

Suggested reviewers

  • paopa
  • wwwy3y3

Poem

Hoppin’ through the code, I spy a change so neat,
Timeouts now live with models, making configs complete.
Deepseek and Google shine with kwargs and fresh flair,
Ollama’s leap to 600 shows we truly care.
Stripe joins the crew in our test parade—
A bunny’s cheer for a well-tuned update!
(_/)


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd2b361 and 165a176.

📒 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 (2 hunks)
  • wren-ai-service/tests/pytest/test_usecases.py (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: pytest
  • GitHub Check: pytest
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
🔇 Additional comments (12)
wren-ai-service/tests/pytest/test_usecases.py (2)

161-161: LGTM! Added stripe use case with bigquery dataset type.

The mapping is consistent with other bigquery-based use cases.


172-177: LGTM! Updated CLI arguments to include stripe use case.

The changes to parser choices and default use cases list are consistent.

wren-ai-service/docs/config_examples/config.ollama.yaml (2)

10-10: LLM Model Timeout Increased
The timeout for the LLM model has been raised from 120 to 600 seconds. This adjustment allows a longer response window when interacting with the Ollama host. Please verify that your downstream services can tolerate this higher timeout.


22-22: Embedder Timeout Increased
Similarly, the embedder’s timeout is now set to 600 seconds. This update ensures both model types have consistent timeout settings, which may be beneficial in scenarios with slower external API responses.

wren-ai-service/docs/config_examples/config.azure.yaml (1)

8-8: Timeout Localization for Azure LLM
The timeout parameter (120 seconds) has been relocated from a global setting to directly reside within the model configuration for azure/gpt-4. This improves clarity by ensuring that the timeout value explicitly applies to the intended model.

wren-ai-service/docs/config_examples/config.groq.yaml (1)

10-10: Explicit Timeout for GROQ LLM Model
A timeout of 120 seconds has now been added under the specific model configuration for groq/llama-3.3-70b-specdec. This change makes the timeout configuration explicit and model-specific.

wren-ai-service/docs/config_examples/config.google_ai_studio.yaml (2)

10-13: Gemini LLM Base Configuration Update
For the gemini/gemini-2.0-flash-exp model, a timeout of 120 seconds has been set and the kwargs (n and temperature) are explicitly defined. This provides better control over model invocation parameters.


14-21: Alias Configuration with Enhanced Response Format
The alias entry (gemini-llm-for-chart) also now has a timeout of 120 seconds along with its dedicated kwargs. Additionally, a response_format with type json_object has been introduced, which should help standardize and parse outputs effectively for chart generation.

wren-ai-service/docs/config_examples/config.deepseek.yaml (4)

9-15: Deepseek Model – First Entry Configuration
The first model block now explicitly declares a timeout of 120 seconds and includes the standard kwargs. Note that the AI summary mentions a change in model signature (expecting a permutation from deepseek/deepseek-reasoner to deepseek/deepseek-chat); please verify that the current identifier “deepseek/deepseek-reasoner” is as intended.


17-23: Deepseek Model – Second Entry Configuration
The second model’s configuration now features an explicit timeout of 120 seconds and the kwargs have been maintained. Confirm that the model identifier (deepseek/deepseek-chat) aligns with the intended update, especially considering the permutation noted in the summary.


25-32: Deepseek Model – Third Entry Configuration
The third model entry sets a timeout of 120 seconds and updates the response_format to json_object. This change is particularly relevant for scenarios expecting structured JSON responses. Ensure that the new response format is supported by downstream components.


39-41: Embedder Configuration Consistency
The embedder section now includes a timeout of 120 seconds for the text-embedding-3-large model, ensuring that timeout settings across different model types remain consistent.

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@paopa paopa merged commit 3793455 into main Feb 10, 2025
@paopa paopa deleted the chore/ai-service/minor-updates branch February 10, 2025 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/ai-service ai-service related module/ai-service ai-service related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants