Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Lok <[email protected]>
  • Loading branch information
daniellok-db committed Dec 16, 2024
1 parent 527df83 commit c20501a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
8 changes: 0 additions & 8 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,17 +487,9 @@ def resolve_missing_references(app, doctree):
text_node.parent.replace(text_node, Text(text_to_render, ""))



def skip_builtins(app, what, name, obj, skip, options):
if "builtins" in name:
return True
return skip


def setup(app):
languagesections.setup(app)
app.connect("doctree-read", resolve_missing_references)
app.connect("autodoc-skip-member", skip_builtins)


linkcheck_ignore = [
Expand Down
22 changes: 10 additions & 12 deletions mlflow/gateway/schemas/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,10 @@ class AudioContentPart(RequestModel):
],
Field(min_items=1),
]
"""
An array of content parts, conforming to the OpenAI spec. A content part is one of:
- :py:class:`TextContentPart <mlflow.gateway.schemas.chat.TextContentPart>`
- :py:class:`ImageContentPart <mlflow.gateway.schemas.chat.ImageContentPart>`
- :py:class:`AudioContentPart <mlflow.gateway.schemas.chat.AudioContentPart>`
"""


ContentType = Annotated[Union[str, ContentPartsList], Field(union_mode="left_to_right")]
"""
The type of the `content` field in system/user/tool/assistant messages. One of:

- str
- :py:class:`ContentPartsList <mlflow.gateway.schemas.chat.ContentPartsList>`
"""

class Function(ResponseModel):
name: str
Expand All @@ -69,6 +57,16 @@ class ToolCall(ResponseModel):


class RequestMessage(BaseModel):
"""
A chat request. ``content`` can be a string, or an array of content parts.
A content part is one of the following:
- :py:class:`TextContentPart <mlflow.gateway.schemas.chat.TextContentPart>`
- :py:class:`ImageContentPart <mlflow.gateway.schemas.chat.ImageContentPart>`
- :py:class:`AudioContentPart <mlflow.gateway.schemas.chat.AudioContentPart>`
"""

role: str
content: Optional[ContentType] = None
tool_calls: Optional[list[ToolCall]] = Field(None, min_items=1)
Expand Down

0 comments on commit c20501a

Please sign in to comment.