Skip to content

Commit 0ed95fc

Browse files
committed
fixed l3 template, add index
1 parent 1ebadc5 commit 0ed95fc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

kcpp_adapters/AutoGuess.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"assistant_end": "<end_of_turn>\n"
5454
}
5555
}, {
56-
"search": ["<|start_header_id|>system"],
56+
"search": ["<|start_header_id|>assistant<|end_header_id|>"],
5757
"name": "Llama 3.x.",
5858
"adapter": {
5959
"system_start": "<|start_header_id|>system<|end_header_id|>\n\n",

koboldcpp.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3202,6 +3202,8 @@ def do_POST(self):
32023202
toolsdata_res = []
32033203
try:
32043204
toolsdata_res = gen['choices'][0]['message']['tool_calls']
3205+
if toolsdata_res and len(toolsdata_res)>0:
3206+
toolsdata_res[0]["index"] = 0 # need to add an index for OWUI
32053207
except Exception:
32063208
toolsdata_res = []
32073209
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}}]})

0 commit comments

Comments
 (0)