alexrudall/ruby-openai

Image generation support for open source models

Closed this issue · 1 comments

Using ollama as described in the readme works wonderfully for chat and embeddings. I am struggeling to get image generation to work with a open source selfhosted model.

This example from the readme does not seem to work with the ollama setup.

response = client.images.generate(
  parameters: {
    prompt: "A baby sea otter cooking pasta wearing a hat of some sort",
    size: "256x256",
  }
)
puts response.dig("data", 0, "url")

That is because ollama does not have the /v1/images/generations endpoint.

https://github.com/ollama/ollama/blob/5f8051180e3b9aeafc153f6b5056e7358a939c88/server/routes.go#L1170-L1175

So maybe this is something that has to be supported by ollama first? Even if that is the case I assume there is some open image generation model out there that could be used. Having a section in the readme on how to get that working would be much appreciated.

Hey @ChillerDragon - currently beyond scope of this library unfortunately, apologies!