from Text
Creates a content holding one text part.
Useful wherever the API takes a Content but the caller only has a string, such as a system instruction:
GenerateContentConfig(systemInstruction = Content.fromText("You are a helpful assistant."))Content copied to clipboard
Parameters
text
The text of the part.
role
The producer of the content, either "user" or "model". The service reads an unset role as "user".