Skip to content

Commit c0adaab

Browse files
committed
Revert "try fix owui"
This reverts commit 12e5b8a.
1 parent 12e5b8a commit c0adaab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

koboldcpp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3206,8 +3206,10 @@ def do_POST(self):
32063206
toolsdata_res[0]["index"] = 0 # need to add an index for OWUI
32073207
except Exception:
32083208
toolsdata_res = []
3209-
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}}]})
3209+
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}}]})
3210+
toolsdata_p2 = json.dumps({"id":"koboldcpp","object":"chat.completion.chunk","created":int(time.time()),"model":friendlymodelname,"choices":[{"index":0,"finish_reason":"tool_calls","delta":{}}]})
32103211
self.wfile.write(f'data: {toolsdata_p1}\n\n'.encode())
3212+
self.wfile.write(f'data: {toolsdata_p2}\n\n'.encode())
32113213
self.wfile.write('data: [DONE]'.encode())
32123214
self.wfile.flush()
32133215
self.close_connection = True

0 commit comments

Comments
 (0)