mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
add comments
This commit is contained in:
parent
fb476d37d5
commit
e8498f5d25
2 changed files with 4 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import json
|
||||
import logging
|
||||
import os
|
||||
import yaml
|
||||
|
||||
logging.basicConfig(
|
||||
|
|
|
|||
|
|
@ -83,7 +83,9 @@ def chat(query: Optional[str], conversation: Optional[List[Tuple[str, str]]], st
|
|||
if message.content:
|
||||
history[-1]["content"] = history[-1].get("content", "") + message.content
|
||||
|
||||
if history[-1]["role"] != "tool" and message.content:
|
||||
# message.content is none for tool calls
|
||||
# when "role = tool" content would contain api call response
|
||||
if message.content and history[-1]["role"] != "tool":
|
||||
conversation[-1] = (
|
||||
conversation[-1][0],
|
||||
conversation[-1][1] + message.content,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue