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

Add model provider Ollama not work #2969

Closed
3 tasks done
ricardocarrer opened this issue Mar 26, 2024 · 1 comment · Fixed by #2973
Closed
3 tasks done

Add model provider Ollama not work #2969

ricardocarrer opened this issue Mar 26, 2024 · 1 comment · Fixed by #2973
Assignees
Labels
🐞 bug Something isn't working

Comments

@ricardocarrer
Copy link

Self Checks

  • 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).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.5.10

Cloud or Self Hosted

Cloud

Steps to reproduce

Settings -> Model Provider -> Ollama

Select box is empty:
Model Type
Completion mode
Vision support

✔️ Expected Behavior

Show text of select box

❌ Actual Behavior

not show text of select box
Captura de Tela 2024-03-25 às 21 36 05

@ricardocarrer ricardocarrer added the 🐞 bug Something isn't working label Mar 26, 2024
Copy link

dosubot bot commented Mar 26, 2024

Hey @ricardocarrer, great to see you back! Hope you're doing well.

Thank you for reporting this issue. Based on the information you've provided, it seems like the issue is related to the UI not properly displaying the options in the select box when adding the Ollama model provider.

The code responsible for rendering the select box in the UI for adding a model provider is located in the ModelSelector component in the file model-selector/index.tsx. This component uses the useState hook to manage the open state of the select box and the useCurrentProviderAndModel custom hook to determine the current provider and model based on the provided modelList and defaultModel.

The ModelSelector component renders a PortalToFollowElem that controls the visibility and positioning of the select box. Inside the PortalToFollowElem, a PortalToFollowElemTrigger is used to display the current model, a deprecated model, or an empty trigger based on the presence of currentModel, defaultModel, and whether a model is selected. The PortalToFollowElemContent contains a Popup component that is passed the defaultModel, modelList, and the handleSelect function for selecting a model.

If the select box is not displaying the options correctly, it could be due to an issue with the modelList or defaultModel props passed to the ModelSelector component, or an issue with the handleSelect function. It could also be due to a problem with the PortalToFollowElem, PortalToFollowElemTrigger, or PortalToFollowElemContent components.

To further investigate this issue, it would be helpful to check the following:

  1. Are the modelList and defaultModel props being correctly passed to the ModelSelector component?
  2. Is the handleSelect function working as expected?
  3. Are there any errors or warnings in the browser console when you try to add the Ollama model provider?
  4. Are there any network requests that are failing when you try to add the Ollama model provider?

Please provide this additional information so we can better understand the issue and find a solution. Dosu

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.

If you want to continue the conversation, start your reply with @dosu-bot.

@crazywoola crazywoola self-assigned this Mar 26, 2024
@crazywoola crazywoola linked a pull request Mar 26, 2024 that will close this issue
13 tasks
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

Successfully merging a pull request may close this issue.

2 participants