Skip to content

Commit

Permalink
fix: turned List ot Sequence in content parts
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovik committed Oct 1, 2024
1 parent ad6e579 commit f8d6a3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions aidial_sdk/chat_completion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
FunctionCall,
FunctionChoice,
Message,
MessageContentImagePart,
MessageContentPart,
MessageContentTextPart,
Request,
ResponseFormat,
Role,
Expand Down
4 changes: 2 additions & 2 deletions aidial_sdk/chat_completion/request.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from enum import Enum
from typing import Any, Dict, List, Literal, Mapping, Optional, Union
from typing import Any, Dict, List, Literal, Mapping, Optional, Sequence, Union

from aidial_sdk.chat_completion.enums import Status
from aidial_sdk.deployment.from_request_mixin import FromRequestDeploymentMixin
Expand Down Expand Up @@ -78,7 +78,7 @@ class MessageContentTextPart(ExtraForbidModel):

class Message(ExtraForbidModel):
role: Role
content: Optional[Union[StrictStr, List[MessageContentPart]]] = None
content: Optional[Union[StrictStr, Sequence[MessageContentPart]]] = None
custom_content: Optional[CustomContent] = None
name: Optional[StrictStr] = None
tool_calls: Optional[List[ToolCall]] = None
Expand Down

0 comments on commit f8d6a3e

Please sign in to comment.