Search code examples
ollamahaystack

localhost:11434/api/generate return error 404


I have an installation of Ollama that is working properly. When I send a request to it at localhost:11434/api/generate

using curl, I get a proper response. However, when I try to call it via haystack_integrations.components.generators.ollama.OllamaGenerator, I get error 404. If I point the OllamaGenerator to localhost:11434, I get some responses, but they are not in the proper format, so I think the function works properly.

What could be the reason that when I call the api/generate endpoint via OllamaGenerate, I get error 404?


Solution

  • Culprit seems to be upgrading to ollama-haystack==1.0.0

    You might want to roll back the version to a previous one. I am using ollama-haystack==0.0.7 and it is able to generate the answers without throwing the said error for me.