Skip to content

TypeError: Object of type ChatResponse is not JSON serializable #5

@suc1

Description

@suc1

Your team did an excellent job.

However, when I run the code from README.md, I encountered the following error with json.dumps():
TypeError: Object of type ChatResponse is not JSON serializable

Here’s the relevant snippet from wrapper.py (line 183):

response = self.client.chat(**ollama_kwargs)
logger.debug(
            "Received response: %s",
            json.dumps(response, indent=2, ensure_ascii=False),
            )

If I comment out the logger.debug() line, everything works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions