Open
Description
When using ollama, I always get a json unmarshal error, no matter json or no or what model is used.
ell version
0.0.15
code
from openai import OpenAI
MODEL = "qwen2.5-coder:14b"
client_ollama = OpenAI(
base_url = "http://localhost:11434/v1",
api_key = "ollama", # required but not used
)
ell.config.verbose = True
ell.config.register_model(MODEL, client_ollama)
@ell.simple(model=MODEL, client=client_ollama)
def extract_data2():
"""You are a friendly coding AI assistant."""
return f'''What's the time?
'''
output = extract_data2()
error
File "/Users/Documents/dev/TMP/ell-test/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 1061, in _request
raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': 'json: cannot unmarshal array into Go struct field Message.messages.content of type string', 'type': 'invalid_request_error', 'param': None, 'code': None}}
Metadata
Metadata
Assignees
Labels
No labels