mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
add stub values for usage, revert cuda malloc pool implementation (+1 squashed commits)
Squashed commits: [fd4cfb44] add stub values for usage, revert cuda malloc pool implementation
This commit is contained in:
parent
c9fdd42da2
commit
427ba21e62
2 changed files with 31 additions and 31 deletions
|
@ -564,9 +564,11 @@ class ServerRequestHandler(http.server.SimpleHTTPRequestHandler):
|
|||
res = {"data": {"seqs":[recvtxt]}}
|
||||
elif api_format==3:
|
||||
res = {"id": "cmpl-1", "object": "text_completion", "created": 1, "model": friendlymodelname,
|
||||
"usage": {"prompt_tokens": 100,"completion_tokens": 100,"total_tokens": 200},
|
||||
"choices": [{"text": recvtxt, "index": 0, "finish_reason": "length"}]}
|
||||
elif api_format==4:
|
||||
res = {"id": "chatcmpl-1", "object": "chat.completion", "created": 1, "model": friendlymodelname,
|
||||
"usage": {"prompt_tokens": 100,"completion_tokens": 100,"total_tokens": 200},
|
||||
"choices": [{"index": 0, "message":{"role": "assistant", "content": recvtxt,}, "finish_reason": "length"}]}
|
||||
else:
|
||||
res = {"results": [{"text": recvtxt}]}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue