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

[Issue Report] Model Addition Failure: Local Models Not Displayed in System-Model Settings Search Results #4450

Open
4 tasks done
LouisCan opened this issue May 16, 2024 · 4 comments
Labels
🐞 bug Something isn't working

Comments

@LouisCan
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.5

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

During the following operations, I encountered an issue: I successfully deployed ReRank, Text Embedding, and Chat models on the server using XinFerence and OpenAI-API-compatible methods. The deployment process indicated that everything was completed successfully, suggesting that these models should be ready for use.

However, when attempting to locate these newly added local models within the System-Model Settings, they were not appearing in the search results. This situation hinders the intended workflow of directly accessing or managing these models from this interface.

Reproduction Steps:

Deploy the ReRank, Text Embedding, and Chat models using XinFerence and OpenAI-API-compatible tools.
After confirming successful deployment, access the system administration interface.
Navigate to the System-Model Settings section and attempt to search for the newly deployed models.

Expected Result:
Upon entering the model name in the search bar of the System-Model Settings, the relevant local models should promptly appear in the search results.

Actual Result:
The models were not retrieved; the search results were empty.

Temporary Solution:
Currently, to make these models visible and selectable in the System-Model Settings, additional steps are required:

Create a new application first.
Within this application, manually select the chat model that was previously deployed.
Only after launching the application do these models become visible within the System-Model Settings interface.
Desired Resolution:
Please investigate and fix this issue to ensure that future deployments of local models are instantly and accurately reflected in the System-Model Settings search results without necessitating further manual intervention.

✔️ Expected Behavior

Upon entering the model name in the search bar of the System-Model Settings, the relevant local models should promptly appear in the search results.

❌ Actual Behavior

The models were not retrieved; the search results were empty.

@dosubot dosubot bot added the 🐞 bug Something isn't working label May 16, 2024
Copy link

dosubot bot commented May 16, 2024

It sounds like the core issue you're experiencing is that newly deployed models aren't showing up in the System-Model Settings search results as expected. This can be addressed by ensuring that the models are properly registered and recognized by the system immediately after deployment, without requiring the creation of a new application as a workaround.

To resolve this, you should utilize the updateModelList function after deploying or updating models. This function is designed to refresh the model list in the UI, making sure that any changes, such as new model deployments, are reflected in the System-Model Settings search results right away.

Here's a brief overview of steps to integrate this solution:

  1. After deploying a new model or updating an existing one, identify the model type(s) affected by the change.
  2. Invoke the updateModelList function for each affected model type. This ensures that the UI's model list is refreshed to include the newly deployed or updated models.

For example, if you've added or updated models related to text generation and reranking, you would call updateModelList with the appropriate model type enums:

updateModelList(ModelTypeEnum.textGeneration);
updateModelList(ModelTypeEnum.rerank);

This approach is particularly useful in environments where models are frequently updated or deployed, as it automates the visibility of these models in the System-Model Settings.

Make sure that the models are correctly categorized under specific model types as defined by the system (e.g., textGeneration, textEmbedding, rerank, etc.), and that they are registered with the system's model provider to be selectable through the UI.

For detailed implementation, refer to the SystemModelSelector and ModelProviderPage components in the Dify repository. These components outline how models are managed and updated within the system, providing a clear example of how to ensure that your models are immediately visible and accessible in the System-Model Settings after deployment.

If you encounter any further issues or have questions about this process, feel free to ask.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@wanshichenguang
Copy link

现在是否支持自定义ReRank模型?

@LouisCan
Copy link
Author

@dosu irrelevant answer

@LouisCan
Copy link
Author

@wanshichenguang can, Use the same interface protocol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants