mirror of
https://github.com/katanemo/plano.git
synced 2026-05-03 04:42:49 +02:00
Integrate Arch-Function-Chat (#449)
This commit is contained in:
parent
f31aa59fac
commit
7d4b261a68
26 changed files with 558 additions and 603 deletions
|
|
@ -120,8 +120,11 @@ def process_stream_chunk(chunk, history):
|
|||
|
||||
if delta.content:
|
||||
# append content to the last history item
|
||||
history[-1]["content"] = history[-1].get("content", "") + delta.content
|
||||
if history[-1]["model"] != "Arch-Function-Chat":
|
||||
history[-1]["content"] = history[-1].get("content", "") + delta.content
|
||||
# yield content if it is from assistant
|
||||
if history[-1]["model"] == "Arch-Function":
|
||||
return None
|
||||
if history[-1]["role"] == "assistant":
|
||||
return delta.content
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue