[OpenAI Extension] Add 'max_logits' parameter in logits endpoint (#4916)

This commit is contained in:
Kim Jaewon 2023-12-15 12:22:43 +09:00 committed by GitHub
parent eaa1fe67f3
commit e53f99faa0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View file

@ -1,6 +1,6 @@
import json
import time
from typing import List
from typing import Dict, List
from pydantic import BaseModel, Field
@ -156,6 +156,7 @@ class TokenCountResponse(BaseModel):
class LogitsRequestParams(BaseModel):
prompt: str
use_samplers: bool = False
top_logits: int | None = 50
frequency_penalty: float | None = 0
max_tokens: int | None = 16
presence_penalty: float | None = 0
@ -168,7 +169,7 @@ class LogitsRequest(GenerationOptions, LogitsRequestParams):
class LogitsResponse(BaseModel):
logits: dict
logits: Dict[str, float]
class ModelInfoResponse(BaseModel):