You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The content parameter of the send_message and similar functions does not imply with the type hint that it accepts Content objects as well (defined in the same file).
Describe the solution you'd like
Extend the type hint and documentation for the content variable of the affected functions.
Describe alternatives you've considered
None
Additional context
I can prepare a PR for this change if desired
The text was updated successfully, but these errors were encountered:
Hello. We do not officially support taking Content objects in ChatSession.send_message, so the type hint is correct and intentional.
The rationale is: Content = parts+role. role is managed by ChatSession. This leaves parts. So send_message essentially takes a list of parts. A PartsType.
If you want to send manually-crafted Content objects to the model, consider using GenerativeModel.generate_content.
@Ark-kun Yes, thanks for the feedback. A clear and easy way could then be to use the parts attribute of the manually crafted Content object, which is a list of parts. By the way, the code to be adjusted is here in Microsoft Autogen
Is your feature request related to a problem? Please describe.
The content parameter of the send_message and similar functions does not imply with the type hint that it accepts Content objects as well (defined in the same file).
Describe the solution you'd like
Extend the type hint and documentation for the content variable of the affected functions.
Describe alternatives you've considered
None
Additional context
I can prepare a PR for this change if desired
The text was updated successfully, but these errors were encountered: