Skip to content

Commit

Permalink
fix: Make tool ID optional, support older syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
whiterabbit1983 committed May 9, 2024
1 parent dfd1ebd commit bb43789
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model-serving/model_api/protocol.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from enum import Enum
from typing import Literal, TypeAlias, Union
from typing import Literal, TypeAlias, Union, Optional
from pydantic import BaseModel, Field, ConfigDict, validator
from vllm.entrypoints.openai.protocol import (
CompletionRequest,
Expand Down Expand Up @@ -93,7 +93,7 @@ class Type(Enum):
class Tool(BaseModel):
type: Type
function: FunctionDef
id: str | None = None
id: Optional[str] = None


class SamplingParams(SamplingParams):
Expand Down

0 comments on commit bb43789

Please sign in to comment.