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

Ollama Embedding Object glitch #6043

Open
criddock opened this issue Jan 31, 2025 · 2 comments
Open

Ollama Embedding Object glitch #6043

criddock opened this issue Jan 31, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@criddock
Copy link

Bug Description

When I add an Ollama Embed object to the workspace,

  • I enter the url for the Ollama server
  • When I push the "refresh" button next to the model name to refresh, the URL vanishes
  • I can click the model name now and choose "nomic" but the Ollama server URL is blank

If I enter the the Ollama URL and refresh to get the model (URL vanishes) and the put the URL back in and press play it seems to work. At least for that session, if I export the config and try to import it later, the URL is blank.

I upgraded to "Latest" a couple of days ago and got a message that all the components needed to be updated (they turned yellow), Once I did that, all the glitchiness started appearing

Reproduction

When I add an Ollama Embed object to the workspace,

  • I enter the url for the Ollama server
  • When I push the "refresh" button next to the model name to refresh, the URL vanishes
  • I can click the model name now and choose "nomic" but the Ollama server URL is blank

If I enter the the Ollama URL and refresh to get the model (URL vanishes) and the put the URL back in and press play it seems to work. At least for that session, if I export the config and try to import it later, the URL is blank.

Expected behavior

The Ollama embed component should accept the URL, allow for model list refresh and then retain the Ollama URL

Who can help?

No response

Operating System

Centos 9 Stream, running Langflow in Docker 27.5.1

Langflow Version

Langflow latest

Python Version

None

Screenshot

No response

Flow File

No response

@criddock criddock added the bug Something isn't working label Jan 31, 2025
Copy link

dosubot bot commented Jan 31, 2025

Hey @criddock! 👋 I'm here to help you out with any bugs or questions you have. I'm a bot designed to assist with problem-solving and answering your queries.

The issue you're experiencing with the Ollama Embed object not retaining the server URL after refreshing or exporting the configuration is due to the way the update_build_config method handles URL validation. If the URL is not deemed valid, it attempts to find a valid URL from a predefined list (URL_LIST). If no valid URL is found, the base_url is set to an empty string or a default valid URL, which results in the original server URL not being retained [1].

To work around this issue, you can manually re-enter the URL after refreshing to ensure it is retained for the current session. However, this won't solve the problem of the URL being lost upon exporting and importing configurations. A potential solution would be to modify the code to ensure the URL is retained even if it is not immediately validated, but this would require changes to the source code.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@edwinjosechittilappilly
Copy link
Collaborator

The Ollama embedding component checks for a valid Ollama server; if the valid server is not found, it resets the URL.

I shall update this error and shall handle this error gracefully,

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