mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 14:19:47 +00:00
typing comment, dataset -> dataset_id
This commit is contained in:
parent
575e51eb76
commit
81ebd1ea92
2 changed files with 21 additions and 13 deletions
|
|
@ -38,11 +38,6 @@ class UnionType(BaseModel):
|
|||
type: Literal["union"] = "union"
|
||||
|
||||
|
||||
class CustomType(BaseModel):
|
||||
type: Literal["custom"] = "custom"
|
||||
validator_class: str
|
||||
|
||||
|
||||
class ChatCompletionInputType(BaseModel):
|
||||
# expects List[Message] for messages
|
||||
type: Literal["chat_completion_input"] = "chat_completion_input"
|
||||
|
|
@ -74,3 +69,16 @@ ParamType = Annotated[
|
|||
],
|
||||
Field(discriminator="type"),
|
||||
]
|
||||
|
||||
# TODO: recursive definition of ParamType in these containers
|
||||
# will cause infinite recursion in OpenAPI generation script
|
||||
# since we are going with ChatCompletionInputType and CompletionInputType
|
||||
# we don't need to worry about ArrayType/ObjectType/UnionType for now
|
||||
# ArrayType.model_rebuild()
|
||||
# ObjectType.model_rebuild()
|
||||
# UnionType.model_rebuild()
|
||||
|
||||
|
||||
# class CustomType(BaseModel):
|
||||
# type: Literal["custom"] = "custom"
|
||||
# validator_class: str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue