mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-04 12:01:24 +02:00
ollama chat api done
This commit is contained in:
+69
-3
@@ -1170,7 +1170,7 @@
|
||||
},
|
||||
"/api/extra/tokencount": {
|
||||
"post": {
|
||||
"description": "Counts the number of tokens in a string.",
|
||||
"description": "Counts the number of tokens in a string, and returns their token IDs. Also aliased to /api/extra/tokenize",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
@@ -1209,8 +1209,19 @@
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ValueResult"
|
||||
}
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "number"
|
||||
},
|
||||
"ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful request"
|
||||
@@ -1222,6 +1233,61 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/extra/detokenize": {
|
||||
"post": {
|
||||
"description": "Converts an array of token IDs into a string.",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"example": {
|
||||
"ids": [529,29989,5205,29989,29958,13]
|
||||
},
|
||||
"schema": {
|
||||
"properties": {
|
||||
"ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"example": {
|
||||
"result": "<|system|>\n",
|
||||
"success": true
|
||||
},
|
||||
"schema": {
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "string",
|
||||
"description": "The detokenized string."
|
||||
},
|
||||
"success": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful request"
|
||||
}
|
||||
},
|
||||
"summary": "Converts an array of token IDs into a string.",
|
||||
"tags": [
|
||||
"api/extra"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/extra/abort": {
|
||||
"post": {
|
||||
"description": "Aborts the currently ongoing text generation. Does not work when multiple requests are in queue.",
|
||||
|
||||
Reference in New Issue
Block a user