clianor / ollama-commit

Commit message generator with Ollama
24 stars 1 forks source link

ERROR Unexpected end of JSON input #4

Open LalaDK opened 2 weeks ago

LalaDK commented 2 weeks ago

Hello.

I'd like to try out your tool, but I get this error message:

❯ ollama-commit
ℹ AI PROVIDER: ollama
ℹ AI MODEL: mistral
ℹ API HOST: http://localhost:11434
ℹ LANGUAGE: en
◐ The currently prepared commit diff is 606 characters long.
◐ Generating commit message...

 ERROR  Unexpected end of JSON input

  at JSON.parse (<anonymous>)
  at _ (/Users/mads/.asdf/installs/nodejs/22.6.0/lib/node_modules/ollama-commit/dist/index.cjs:2:1110)
  at async U (/Users/mads/.asdf/installs/nodejs/22.6.0/lib/node_modules/ollama-commit/dist/index.cjs:18:57)

I've tried with different changes, but I still get the error.

Mikaleb commented 1 day ago

Same here

Naimul007A commented 3 hours ago

make sure you have AI MODEL: mistral in your local.Coz ollama-commit use by default mistral Model. run llama run mistral

clianor commented 1 hour ago

Hello,

It seems that the issue is caused by the ai model not responding in a fixed json format.

We are planning to introduce Structured Output to solve this issue.

Thank you.

clianor commented 1 hour ago

Unfortunately, due to my personal schedule, I will not be able to work quickly.