Class AssistantMessage
public class AssistantMessage : ChatMessage
- Inheritance
-
objectAssistantMessage
- Derived
- Inherited Members
- Extension Methods
Constructors
AssistantMessage()
public AssistantMessage()
AssistantMessage(ChatContent, ToolCall[], Usage)
public AssistantMessage(ChatContent content, ToolCall[] tools = null, Usage usage = null)
Parameters
contentChatContenttoolsToolCall[]usageUsage
AssistantMessage(GeneratedImage)
public AssistantMessage(GeneratedImage image)
Parameters
imageGeneratedImage
AssistantMessage(Texture2D)
public AssistantMessage(Texture2D texture)
Parameters
textureTexture2D
Properties
Annotations
public List<Annotation> Annotations { get; set; }
Property Value
- List<Annotation>
Audio
public SpeechOutputData Audio { get; set; }
Property Value
GeneratedImage
The generated image from the model.
public GeneratedImage GeneratedImage { get; set; }
Property Value
GeneratedTexture
public Texture2D GeneratedTexture { get; set; }
Property Value
- Texture2D
Role
The role of the messages author.
Role is abstract and overridden in derived classes to enforce consistency.
This avoids relying on constructor or deserialization logic to set the role.
JSON.NET does not call parameterized constructors or set get-only properties during deserialization.
public override ChatRole Role { get; }
Property Value
Signature
public string Signature { get; set; }
Property Value
- string
Thinking
public string Thinking { get; set; }
Property Value
- string
Tools
Optional. A list of tool calls (functions) the model wants to use.
public ToolCall[] Tools { get; set; }
Property Value
- ToolCall[]
Usage
The usage statistics for the response message.
public Usage Usage { get; set; }
Property Value
Methods
GetSpeechAsync(AudioFormat, MIMEType)
public UniTask<AudioClip> GetSpeechAsync(AudioFormat format, MIMEType mimeType)
Parameters
formatAudioFormatmimeTypeMIMEType
Returns
- UniTask<AudioClip>
Operators
implicit operator string(AssistantMessage)
public static implicit operator string(AssistantMessage message)
Parameters
messageAssistantMessage
Returns
- string