mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
parent
12e5b8abdb
commit
c0adaabfa4
1 changed files with 3 additions and 1 deletions
|
@ -3206,8 +3206,10 @@ Enter Prompt:<br>
|
|||
toolsdata_res[0]["index"] = 0 # need to add an index for OWUI
|
||||
except Exception:
|
||||
toolsdata_res = []
|
||||
toolsdata_p1 = json.dumps({"id":"koboldcpp","object":"chat.completion.chunk","created":int(time.time()),"model":friendlymodelname,"choices":[{"index":0,"finish_reason":"tool_calls","delta":{'role':'assistant','content':None, "tool_calls":toolsdata_res}}]})
|
||||
toolsdata_p1 = json.dumps({"id":"koboldcpp","object":"chat.completion.chunk","created":int(time.time()),"model":friendlymodelname,"choices":[{"index":0,"finish_reason":None,"delta":{'role':'assistant','content':None, "tool_calls":toolsdata_res}}]})
|
||||
toolsdata_p2 = json.dumps({"id":"koboldcpp","object":"chat.completion.chunk","created":int(time.time()),"model":friendlymodelname,"choices":[{"index":0,"finish_reason":"tool_calls","delta":{}}]})
|
||||
self.wfile.write(f'data: {toolsdata_p1}\n\n'.encode())
|
||||
self.wfile.write(f'data: {toolsdata_p2}\n\n'.encode())
|
||||
self.wfile.write('data: [DONE]'.encode())
|
||||
self.wfile.flush()
|
||||
self.close_connection = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue