-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
AnnotationFileCitation
wrongly references a file index instead of a text index. To match the url citation better, I suggest """The index at which to insert the file citation in the message."""
. A more verbose string could give an example of inserting the citation.
openai-python/src/openai/types/responses/response_output_text.py
Lines 28 to 29 in a825874
index: int | |
"""The index of the file in the list of files.""" |
My interpretation is founded in a discussion and experimental observation that index lines up with the end of a word in the output_text
. Note that for a "manual" check account for new lines as a single character and be aware that a text editor may not have a zero-indexed character position.
See also the file search guide. It is slightly ambiguous until tested that it refers to to an insertion point and not the location within the cited document.
Making a further observation within the same file, AnnotationFilePath
has the same documentation for index
, but it isn't relevant to my use case so I'm not sure how accurate it is.