TextAnnotation

sealed class TextAnnotation

A TextContent created by an Assistant may contain annotations.

Annotations will be present in the TextContent.Text.value, and may look like this:

  • 【13†source】

  • sandbox:/mnt/data/file.csv

You should replace the text in the message content with however you would like to annotate your files. For example, you could replace the text with a link to the file, or you could replace the text with the file contents.

Inheritors

Types

Link copied to clipboard
data class FileCitation(val text: String, val fileCitation: TextAnnotation.FileCitation.FileQuote, val startIndex: Int, val endIndex: Int) : TextAnnotation

File citations are created by the RetrievalTool and define references to a specific quote in a specific file that used by the Assistant to generate the response.

Link copied to clipboard
data class FilePath(val text: String, val filePath: TextAnnotation.FilePath.FileWrapper, val startIndex: Int, val endIndex: Int) : TextAnnotation

File paths are created by the CodeInterpreterTool and contain references to the files generated by the tool.