posit-dev / posit-dev/querychat

BUG: Don't know how to handle content type <class 'chatlas._content.ContentToolResult'>

Open
#269 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
212
Forks
29
Avg merge
22h 24m
Merged PRs (30d)
27

Description

I have been trying to explore query chat.

I found the below bug consistently:

AI Provider used:

from chatlas import ChatOpenAICompletions

Every time when I try to make a second query after the first query on the chat, I'm getting the below error:

Sorry, I encountered an error processing your request: Don't know how to handle content type <class 'chatlas._content.ContentToolResult'> for role='assistant'.

I have attached the chat conversation and files for the reproducing the bug.

please let me know if any other information required.

app.py
client.py

query-chat-bug.md

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the second-query failure with ChatOpenAICompletions using the attached app.py, client.py, and query-chat-bug.md. Trace how the assistant response containing ContentToolResult is processed; done means a second query completes without the reported content-type error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.