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

update documentation to show new syntax for creating ollama models with client.create #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

indigotechtutorials
Copy link

@indigotechtutorials indigotechtutorials commented Jan 18, 2025

I ran into an issue when I recently updated Ollama and I figured it was an API change. #6
They changed the way that you send parameters for creating models with Ollama and simplified it.
Previously you would need to pass in a complex modelfile string into the client.create

result = client.create(
  { name: 'mario',
    modelfile: "FROM llama2\nSYSTEM You are mario from Super Mario Bros." }
) do |event, raw|
  puts event
end 

Now this is simplified by setting the model, from, and system parameter separately as keys like this

result = client.create(
  { model: 'mario',
    from: 'llama3.2',
    system: 'You are mario from Super Mario Bros.' }
) do |event, raw|
  puts event
end

I updated the docs to show the new syntax of creating ollama models with client.create so hopefully this helps other developers who are using this gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant