async-openai icon indicating copy to clipboard operation
async-openai copied to clipboard

Newbie Error: JSONDeserialize(Error("expected value", line: 8, column: 1))

Open ganakee opened this issue 2 months ago • 2 comments

I am trying some of the test code.

In each case, I get the error: Error: JSONDeserialize(Error("expected value", line: 8, column: 1))

Example:

let response = client.chat().create(request).await?;
OR
let response = client.images().create(request).await?;

My Cargo.toml has:

[dependencies]
async-openai = "0.29.3"
tokio = { version = "1.47.1", features = ["full"] }
serde_json = "1.0.145"

ganakee avatar Sep 27 '25 01:09 ganakee

I worked with this issue some more without resolution.

I am trying to use the new Ollama Cloud OPenAI compatible models.

I verified (there was a bug in the Ollama Cloud JSON implementation whcih was quickly fixed). I am still getting this error despite the JSON fix.

Has anyone else tried Ollama Cloud with this async-openai API?

ganakee avatar Sep 30 '25 00:09 ganakee

Please consider using byot feature when types dont match official OpenAI spec.

64bit avatar Nov 05 '25 02:11 64bit