| 59 | |
| 60 | |
| 61 | class UserContent(types.Content): |
| 62 | |
| 63 | def __init__(self, text_or_part: str): |
| 64 | parts = [ |
| 65 | types.Part.from_text(text=text_or_part) |
| 66 | if isinstance(text_or_part, str) |
| 67 | else text_or_part |
| 68 | ] |
| 69 | super().__init__(role='user', parts=parts) |
| 70 | |
| 71 | |
| 72 | class ModelContent(types.Content): |
no outgoing calls