Skip to content

Commit

Permalink
fix protocol to make sure function call input get accepted correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjay920 committed Jun 12, 2024
1 parent 49f4197 commit 4fa44c3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vllm/entrypoints/openai/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class CustomChatCompletionMessageParam(TypedDict, total=False):
same role.
"""

tool_calls : Optional[list]

tool_call_id : str


ChatCompletionMessageParam = Union[
openai.types.chat.ChatCompletionMessageParam,
Expand Down Expand Up @@ -129,8 +133,7 @@ class ChatCompletionNamedToolChoiceParam(OpenAIBaseModel):
class ChatCompletionRequest(OpenAIBaseModel):
# Ordered by official OpenAI API documentation
# https://platform.openai.com/docs/api-reference/chat/create
# messages: List[ChatCompletionMessageParam] # TODO: figure out why
messages: List[dict]
messages: List[ChatCompletionMessageParam]
model: str
frequency_penalty: Optional[float] = 0.0
logit_bias: Optional[Dict[str, float]] = None
Expand Down

0 comments on commit 4fa44c3

Please sign in to comment.