Skip to content

Commit

Permalink
hotfix: response type for chat completion for azure
Browse files Browse the repository at this point in the history
  • Loading branch information
csgulati09 committed May 31, 2024
1 parent 436b7b2 commit 5b6c2e0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions portkey_ai/api_resources/types/chat_complete_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DeltaToolCallFunction(BaseModel):


class DeltaToolCall(BaseModel):
index: int
index: Optional[int]
id: Optional[str] = None
function: Optional[DeltaToolCallFunction] = None
type: Optional[str] = None
Expand Down Expand Up @@ -62,13 +62,13 @@ def __getitem__(self, key):


class FunctionCall(BaseModel):
arguments: str
name: str
arguments: Optional[str]
name: Optional[str]


class ChatCompletionMessageToolCall(BaseModel):
id: Optional[str]
function: FunctionCall
function: Optional[FunctionCall]
type: Optional[str]


Expand All @@ -89,7 +89,7 @@ class ChatCompletionTokenLogprob(BaseModel):
token: Optional[str]
bytes: Optional[List[int]] = None
logprob: Optional[float]
top_logprobs: List[TopLogprob]
top_logprobs: Optional[List[TopLogprob]]


class ChoiceLogprobs(BaseModel):
Expand All @@ -100,12 +100,12 @@ class Choice(BaseModel):
finish_reason: Optional[str]
index: Optional[int]
logprobs: Optional[ChoiceLogprobs] = None
message: ChatCompletionMessage
message: Optional[ChatCompletionMessage]


class ChatCompletions(BaseModel):
id: Optional[str]
choices: List[Choice]
choices: Optional[List[Choice]]
created: Optional[int]
model: Optional[str]
object: Optional[str]
Expand Down

0 comments on commit 5b6c2e0

Please sign in to comment.