typing comment, dataset -> dataset_id

This commit is contained in:
Xi Yan 2024-10-25 12:59:47 -07:00
parent 575e51eb76
commit 81ebd1ea92
2 changed files with 21 additions and 13 deletions

View file

@ -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