ollama / ollama-python

Ollama Python library
https://ollama.com
MIT License
4.09k stars 344 forks source link

Usage body for LLaVA model #44

Closed sanujenLLM closed 8 months ago

sanujenLLM commented 8 months ago

What is the request body for the LLaVA model which needs to handle image inputs along with text?

This is the sample provided in the repo for the llama2 model.

import ollama
response = ollama.chat(model='llama2', messages=[
  {
    'role': 'user',
    'content': 'Why is the sky blue?',
  },
])
print(response['message']['content'])
mxyng commented 8 months ago

llava is a multimodal model. There's an example here