Class AssistantMessage
Inheritance
object
AssistantMessage
Assembly: .dll
Syntax
public class AssistantMessage : ChatMessage
Constructors
AssistantMessage()
Declaration
public AssistantMessage()
AssistantMessage(ChatContent, ToolCall[], Usage)
Declaration
public AssistantMessage(ChatContent content, ToolCall[] tools = null, Usage usage = null)
Parameters
AssistantMessage(GeneratedImage)
Declaration
public AssistantMessage(GeneratedImage image)
Parameters
AssistantMessage(Texture2D)
Declaration
public AssistantMessage(Texture2D texture)
Parameters
Type |
Name |
Description |
Texture2D |
texture |
|
Properties
Annotations
Declaration
public List<Annotation> Annotations { get; set; }
Property Value
Audio
Declaration
public SpeechOutputData Audio { get; set; }
Property Value
GeneratedImage
The generated image from the model.
Declaration
public GeneratedImage GeneratedImage { get; set; }
Property Value
GeneratedTexture
Declaration
public Texture2D GeneratedTexture { get; set; }
Property Value
Type |
Description |
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.
Declaration
public override ChatRole Role { get; }
Property Value
Overrides
Signature
Declaration
public string Signature { get; set; }
Property Value
Thinking
Declaration
public string Thinking { get; set; }
Property Value
Optional. A list of tool calls (functions) the model wants to use.
Declaration
public ToolCall[] Tools { get; set; }
Property Value
Usage
The usage statistics for the response message.
Declaration
public Usage Usage { get; set; }
Property Value
Methods
Declaration
public UniTask<AudioClip> GetSpeechAsync(AudioFormat format, MIMEType mimeType)
Parameters
Type |
Name |
Description |
AudioFormat |
format |
|
MIMEType |
mimeType |
|
Returns
Type |
Description |
UniTask<AudioClip> |
|
Operators
implicit operator string(AssistantMessage)
Declaration
public static implicit operator string(AssistantMessage message)
Parameters
Returns
Extension Methods