mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
/props endpoint: provide context size through default_generation_settings (#1237)
This commit is contained in:
parent
6bd686c8a8
commit
fd320f6682
1 changed files with 7 additions and 1 deletions
|
@ -2013,7 +2013,13 @@ Enter Prompt:<br>
|
|||
elif self.path=="/props":
|
||||
ctbytes = handle.get_chat_template()
|
||||
chat_template = ctypes.string_at(ctbytes).decode("UTF-8","ignore")
|
||||
response_body = (json.dumps({"chat_template":chat_template,"total_slots":1}).encode())
|
||||
response_body = (json.dumps({
|
||||
"chat_template": chat_template,
|
||||
"total_slots": 1,
|
||||
"default_generation_settings": {
|
||||
"n_ctx": maxctx,
|
||||
},
|
||||
}).encode())
|
||||
|
||||
elif self.path=="/api" or self.path=="/docs" or self.path.startswith(('/api/?json=','/api?json=','/docs/?json=','/docs?json=')):
|
||||
content_type = 'text/html'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue