mirror of
https://github.com/katanemo/plano.git
synced 2026-06-26 15:39:40 +02:00
update response from upstream llm to now include it in dict with "response"
This commit is contained in:
parent
5bd991e97b
commit
f2323f771c
4 changed files with 30 additions and 11 deletions
|
|
@ -88,6 +88,18 @@ def chat(
|
|||
|
||||
yield "", conversation, history, debug_output, model_selector
|
||||
|
||||
# update assistant response to have correct format
|
||||
# arch-fc 1.1 expects following format:
|
||||
# {
|
||||
# "response": "<assistant response>",
|
||||
# }
|
||||
|
||||
if not history[-1]["model"].startswith("Arch"):
|
||||
assistant_response = {
|
||||
"response": history[-1]["content"],
|
||||
}
|
||||
history[-1]["content"] = json.dumps(assistant_response)
|
||||
|
||||
|
||||
def main():
|
||||
with gr.Blocks(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue