mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
update assistant message format
This commit is contained in:
parent
cee177e8c4
commit
9b538ff074
1 changed files with 5 additions and 1 deletions
|
|
@ -93,12 +93,16 @@ def chat(
|
|||
# {
|
||||
# "response": "<assistant response>",
|
||||
# }
|
||||
# and this entire block needs to be encoded in ```json\n{json_encoded_content}\n```
|
||||
|
||||
if not history[-1]["model"].startswith("Arch"):
|
||||
assistant_response = {
|
||||
"response": history[-1]["content"],
|
||||
}
|
||||
history[-1]["content"] = json.dumps(assistant_response)
|
||||
history[-1]["content"] = "```json\n{}\n```".format(
|
||||
json.dumps(assistant_response)
|
||||
)
|
||||
log.info("history: {}".format(json.dumps(history)))
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue