Skip to content

JSONDecodeError #410

@corv89

Description

@corv89

Describe the bug
I've setup ggml in config.py like so,

        default=GGML(
            max_context_length=2048,
            server_url="http://192.168.1.19:8000"
        )

To Reproduce
Steps to reproduce the behavior:

  1. Write a prompt and click on continue
  2. See error

Expected behavior
Expected a response (API is confirmed to be working)

Environment

  • GGUF model file
  • Operating System: Linux and MacOS
  • Python Version: recent
  • Continue Version: latest

Console logs

Traceback (most recent call last):

  File "continuedev/src/continuedev/core/autopilot.py", line 367, in _run_singular_step
    observation = await step(self.continue_sdk)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "continuedev/src/continuedev/core/main.py", line 359, in __call__
    return await self.run(sdk)
           ^^^^^^^^^^^^^^^^^^^

  File "continuedev/src/continuedev/plugins/steps/chat.py", line 85, in run
    async for chunk in generator:

  File "continuedev/src/continuedev/libs/llm/ggml.py", line 112, in stream_chat
    async for chunk in generator():

  File "continuedev/src/continuedev/libs/llm/ggml.py", line 103, in generator
    yield json.loads(chunk[6:])["choices"][0][
          ^^^^^^^^^^^^^^^^^^^^^

  File "json/__init__.py", line 346, in loads

  File "json/decoder.py", line 337, in decode

  File "json/decoder.py", line 355, in raw_decode

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:chatRelates to chat interfacekind:bugIndicates an unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions