Add logit_bias to the OpenAI api (#577)

* Add logit_bias to the OpenAI api

* Cleanup and refactor, test in swagger.

---------

Co-authored-by: Concedo <39025047+LostRuins@users.noreply.github.com>
This commit is contained in:
DebuggingLife46 2023-12-26 21:56:19 +05:30 committed by GitHub
parent 5006b23099
commit e733a9e425
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 70 additions and 5 deletions

View file

@ -8,7 +8,7 @@
<!-- schema -->
<script>
let spec = {
let spec = {
"components": {
"schemas": {
"BasicError": {
@ -176,7 +176,17 @@
"default": false,
"description": "KoboldCpp ONLY. If true, also removes detected stop_sequences from the output and truncates all text after them. Does not work with SSE streaming.",
"type": "boolean"
}
},
"logit_bias": {
"default": {},
"description": "KoboldCpp ONLY. An dictionary of key-value pairs, which indicate the token IDs (int) and logit bias (float) to apply for that token. Up to 16 value can be provided.",
"type": "object",
"example": {
"2": -20,
"145": -1.4,
"3105": 3.2
},
},
},
"required": [
"prompt"