continue icon indicating copy to clipboard operation
continue copied to clipboard

Ollama models use json output format

Open kohlerm opened this issue 2 years ago • 5 comments

Before submitting your bug report

Relevant environment info

- OS: macOS
- Continue version: dev branch
- IDE version: 1.95 insider
- Model: all ollama models
- config.json:

Description

https://github.com/continuedev/continue/blob/694a044a608e0700cab027dec9ad580f111a234a/core/llm/llms/Ollama.ts#L248 forces the model to output json

To reproduce

No response

Log output

No response

kohlerm avatar Oct 29 '24 12:10 kohlerm

removing the line fixes it

kohlerm avatar Oct 29 '24 12:10 kohlerm

My ollama models recently stopped working and my tabAutoCompletion only suggests "{" anymore. I think this might be the cause. This renders the autocompletion unusable.

Just confirmed. I have the same config.json file for IntelliJ and VS Code.

In VSCode, I get meaningful autocomplete suggestions. In IntelliJ, I just see "{".

I am on the latest Continue@IntelliJ 0.0.79 running on IntelliJ Ultimate 2024.2.4

florian-hansen-mw avatar Oct 30 '24 17:10 florian-hansen-mw

I'm also experiencing this bug on IntelliJ.

Continue@IntelliJ 0.0.79 running on IntelliJ Ultimate 2024.2.4

every chat response I get is in Json format.

json-response-continue

It also often only prints part of the response.

json-response-continue-incomplete

Relevant Environment information:

  • OS: Ubuntu
  • Continue version: 0.0.79
  • IDE version: IntelliJ Ultimate 2024.2.4
  • Model: all ollama models
  • config.json:
{
  "models": [
    {
      "title": "Llama 3",
      "provider": "ollama",
      "model": "llama3"
    },
    {
      "title": "Phi3",
      "provider": "ollama",
      "model": "phi3"
    }
  ],
  "customCommands": [
    {
      "name": "test",
      "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
      "description": "Write unit tests for highlighted code"
    }
  ],
  "tabAutocompleteModel": {
    "title": "Starcoder 3b",
    "provider": "ollama",
    "model": "starcoder2:3b"
  },
  "allowAnonymousTelemetry": true,
  "embeddingsProvider": {
    "provider": "transformers.js"
  }
}

123Haynes avatar Oct 31 '24 11:10 123Haynes

@kohlerm good find 0.79 is broken for a couple issues, we're gonna hide it

RomneyDa avatar Oct 31 '24 20:10 RomneyDa

Fixed by https://github.com/continuedev/continue/pull/2759

RomneyDa avatar Nov 01 '24 07:11 RomneyDa