Skip to content
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

fix: improve embedding model validation logic for dataset operations #3235

Merged
merged 4 commits into from
Nov 7, 2024

Conversation

mktawileh
Copy link
Contributor

@mktawileh mktawileh commented Nov 6, 2024

What problem does this PR solve?
When creating or updating datasets with custom embedding models (e.g., Ollama), the validation logic was too restrictive and prevented valid models from being used. The previous implementation would reject valid custom models if they weren't in the predefined list, even when they existed in TenantLLMService.

Changes:

  • Simplify and improve the embedding model validation flow in create/update endpoints
  • Check TenantLLMService for custom models before rejecting
  • Make validation logic more consistent between create and update operations

What problem does this PR solve?

This fix allows users to successfully create and update datasets with custom embedding models while maintaining proper validation checks.

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

What problem does this PR solve?
When creating or updating datasets with custom embedding models (e.g., Ollama),
the validation logic was too restrictive and prevented valid models from being
used. The previous implementation would reject valid custom models if they
weren't in the predefined list, even when they existed in TenantLLMService.

Type of change: Bug Fix

Changes:
- Simplify and improve the embedding model validation flow in create/update endpoints
- Check TenantLLMService for custom models before rejecting
- Make validation logic more consistent between create and update operations

This fix allows users to successfully create and update datasets with custom
embedding models while maintaining proper validation checks.
@KevinHuSh KevinHuSh requested a review from Feiue November 6, 2024 10:02
@KevinHuSh KevinHuSh added the ci Continue Integration label Nov 6, 2024
api/apps/sdk/dataset.py Outdated Show resolved Hide resolved
api/apps/sdk/dataset.py Outdated Show resolved Hide resolved
KevinHuSh and others added 2 commits November 7, 2024 09:53
Co-authored-by: liuhua <10215101452@stu.ecnu.edu.cn>
Co-authored-by: liuhua <10215101452@stu.ecnu.edu.cn>
@KevinHuSh KevinHuSh merged commit 5038552 into infiniflow:main Nov 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continue Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants