mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
more comments
This commit is contained in:
parent
a4746ea1f9
commit
ae359a9c7b
1 changed files with 3 additions and 0 deletions
|
|
@ -74,6 +74,9 @@ def predict(message, state):
|
|||
content = response.choices[0].message.content
|
||||
|
||||
history.append({"role": "assistant", "content": content, "model": response.model})
|
||||
|
||||
# for gradio UI we don't want to show raw tool calls and messages from developer application
|
||||
# so we're filtering those out
|
||||
history_view = [h for h in history if h["role"] != "tool" and "content" in h]
|
||||
messages = [
|
||||
(history_view[i]["content"], history_view[i + 1]["content"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue