MessageContentTextAnnotations.fileCitation constructor

const MessageContentTextAnnotations.fileCitation({
  1. required String type,
  2. required String text,
  3. @JsonKey(name: 'file_citation') required MessageContentTextAnnotationsFileCitation fileCitation,
  4. @JsonKey(name: 'start_index') required int startIndex,
  5. @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.

Implementation

const factory MessageContentTextAnnotations.fileCitation({
  /// Always `file_citation`.
  required String type,

  /// The text in the message content that needs to be replaced.
  required String text,

  /// A citation within the message that points to a specific quote from a specific File associated with the assistant or the message.
  @JsonKey(name: 'file_citation')
  required MessageContentTextAnnotationsFileCitation fileCitation,

  /// The start index of the text in the message content that needs to be replaced.
  @JsonKey(name: 'start_index') required int startIndex,

  /// The end index of the text in the message content that needs to be replaced.
  @JsonKey(name: 'end_index') required int endIndex,
}) = MessageContentTextAnnotationsFileCitationObject;