-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
enhancementNew feature or requestNew feature or request
Description
This facilitates the integration of the DIAL SDK with the DIAL Client without requiring an actual dependency between the two.
See the method that needs to be relaxed:
ai-dial-sdk/aidial_sdk/utils/_attachment.py
Lines 21 to 27 in e673682
| def create_attachment(*args, **kwargs) -> Attachment: | |
| if args and isinstance(args[0], Attachment): | |
| return cast(Attachment, args[0]) | |
| elif isinstance(kwargs.get("attachment"), Attachment): | |
| return cast(Attachment, kwargs.get("attachment")) | |
| else: | |
| return _attachment_from_fields(*args, **kwargs) |
Don't forget to add unit tests that call add_attachment method on the user-defined MyAttachment class with and without extra fields such as index.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
No status