mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-14 15:57:27 +00:00
OAI: Fix chat completion validation
Validation wasn't properly run on older pydantic, so ChatCompletionRespChoice was being sent instead of a ChatCompletionMessage when streaming responses. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -18,7 +18,7 @@ class ChatCompletionStreamChoice(BaseModel):
|
||||
# Index is 0 since we aren't using multiple choices
|
||||
index: int = 0
|
||||
finish_reason: Optional[str]
|
||||
delta: Union[ChatCompletionRespChoice, dict] = {}
|
||||
delta: Union[ChatCompletionMessage, dict] = {}
|
||||
|
||||
# Inherited from common request
|
||||
class ChatCompletionRequest(CommonCompletionRequest):
|
||||
|
||||
Reference in New Issue
Block a user