Skip to content

Commit

Permalink
handle genkey abort
Browse files Browse the repository at this point in the history
  • Loading branch information
Concedo authored and Concedo committed Oct 6, 2023
1 parent 23d47e0 commit a9ced6e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 745 deletions.
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6704,6 +6704,9 @@
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"genkey": lastcheckgenkey
}),
})
.then((response) => response.json())
.then((data) => {})
Expand Down Expand Up @@ -7171,6 +7174,8 @@
{
lastcheckgenkey = "KCPP"+(Math.floor(1000 + Math.random() * 9000)).toString();
submit_payload.params.genkey = lastcheckgenkey;
}else{
lastcheckgenkey = "";
}

//v2 api specific fields
Expand Down
25 changes: 21 additions & 4 deletions koboldcpp_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@
"MaxContextLengthSetting": {
"properties": {
"value": {
"maximum": 2048,
"minimum": 512,
"minimum": 8,
"type": "integer"
}
},
Expand All @@ -227,7 +226,6 @@
"MaxLengthSetting": {
"properties": {
"value": {
"maximum": 512,
"minimum": 1,
"type": "integer"
}
Expand Down Expand Up @@ -642,7 +640,7 @@
"properties": {
"genkey": {
"type": "string",
"description": "A unique key used to poll for this generation while it is in progress."
"description": "A unique key used to identify this generation while it is in progress."
}
},
"type": "object"
Expand Down Expand Up @@ -722,6 +720,25 @@
"/extra/abort": {
"post": {
"description": "Aborts the currently ongoing text generation. Does not work when multiple requests are in queue.",
"requestBody": {
"content": {
"application/json": {
"example": {
"genkey": "KCPP2342"
},
"schema": {
"properties": {
"genkey": {
"type": "string",
"description": "A unique key used to identify this generation while it is in progress."
}
},
"type": "object"
}
}
},
"required": false
},
"responses": {
"200": {
"content": {
Expand Down
Loading

0 comments on commit a9ced6e

Please sign in to comment.