mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
fix ui
This commit is contained in:
parent
85aee8c9a8
commit
a6a8b63551
2 changed files with 5 additions and 1 deletions
|
|
@ -143,10 +143,13 @@ def chat(query: Optional[str], conversation: Optional[List[Tuple[str, str]]], st
|
|||
|
||||
history[-1]["model"] = chunk.model
|
||||
if chunk.choices[0].delta.content:
|
||||
if not history[-1]["content"]:
|
||||
history[-1]["content"] = ""
|
||||
history[-1]["content"] = (
|
||||
history[-1]["content"] + chunk.choices[0].delta.content
|
||||
)
|
||||
history[-1]["tool_calls"] = chunk.choices[0].delta.tool_calls
|
||||
if chunk.choices[0].delta.tool_calls:
|
||||
history[-1]["tool_calls"] = chunk.choices[0].delta.tool_calls
|
||||
|
||||
if chunk.model and chunk.choices[0].delta.content:
|
||||
messages[-1] = (
|
||||
|
|
|
|||
|
|
@ -688,6 +688,7 @@ impl StreamContext {
|
|||
|
||||
if self.streaming_response {}
|
||||
|
||||
self.tool_calls = None;
|
||||
return self.send_http_response(
|
||||
StatusCode::OK.as_u16().into(),
|
||||
vec![("Powered-By", "Katanemo")],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue