MessageContentTextAnnotations class sealed

An annotation within the message that points to a specific quote from a specific File associated with the assistant or the message.

Implementers
Annotations
  • @Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)

Constructors

MessageContentTextAnnotations.fileCitation({required String type, required String text, @JsonKey(name: 'file_citation') required MessageContentTextAnnotationsFileCitation fileCitation, @JsonKey(name: 'start_index') required int startIndex, @JsonKey(name: 'end_index') required int endIndex})
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.
const
factory
MessageContentTextAnnotations.filePath({required String type, required String text, @JsonKey(name: 'file_path') required MessageContentTextAnnotationsFilePath filePath, @JsonKey(name: 'start_index') required int startIndex, @JsonKey(name: 'end_index') required int endIndex})
A URL for the file that's generated when the assistant used the code_interpreter tool to generate a file.
const
factory
MessageContentTextAnnotations.fromJson(Map<String, dynamic> json)
Object construction from a JSON representation
factory

Properties

copyWith → $MessageContentTextAnnotationsCopyWith<MessageContentTextAnnotations>
Create a copy of MessageContentTextAnnotations with the given fields replaced by the non-null parameter values.
no setterinherited
endIndex int
The end index of the text in the message content that needs to be replaced.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startIndex int
The start index of the text in the message content that needs to be replaced.
no setterinherited
text String
The text in the message content that needs to be replaced.
no setterinherited
type String
Always file_citation.
no setterinherited

Methods

map<TResult extends Object?>({required TResult fileCitation(MessageContentTextAnnotationsFileCitationObject value), required TResult filePath(MessageContentTextAnnotationsFilePathObject value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult? fileCitation(MessageContentTextAnnotationsFileCitationObject value)?, TResult? filePath(MessageContentTextAnnotationsFilePathObject value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult fileCitation(MessageContentTextAnnotationsFileCitationObject value)?, TResult filePath(MessageContentTextAnnotationsFilePathObject value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult fileCitation(String type, String text, MessageContentTextAnnotationsFileCitation fileCitation, int startIndex, int endIndex)?, TResult filePath(String type, String text, MessageContentTextAnnotationsFilePath filePath, int startIndex, int endIndex)?, required TResult orElse()}) → TResult
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this MessageContentTextAnnotations to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult fileCitation(String type, String text, MessageContentTextAnnotationsFileCitation fileCitation, int startIndex, int endIndex), required TResult filePath(String type, String text, MessageContentTextAnnotationsFilePath filePath, int startIndex, int endIndex)}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult? fileCitation(String type, String text, MessageContentTextAnnotationsFileCitation fileCitation, int startIndex, int endIndex)?, TResult? filePath(String type, String text, MessageContentTextAnnotationsFilePath filePath, int startIndex, int endIndex)?}) → TResult?
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited