When using retrieval on Assistants my answers are returned with a source annotation, eg: 【35†source】… is it possible for the response to be received without such annotation? I’ve tried prompting it not to send it back but it doesn’t seem to work?
Same problem here… I have added in the prompt not to cite anything. Sometimes the output is good sometimes not.
Here is OpenAI code example for dealing with annotations, adding them as footnotes.
If you want them gone, you can just eliminate the contents of response message within the Japanese brackets with a regex or pattern match in your code.
Here’s some quickie code for an idea.
message_text = ("This is a sample text【9†source】 with source "
"tags using annotations【10†source】and some other content.")
# Use re.sub() to remove the matched source
# tags and their contents
pattern = r'【\d+†source】'
cleaned_text = re.sub(pattern, '', message_text)
You might need to close up extra spaces depending on where they appear if your renderer doesn’t already not show extra white space.
Thanks for the help! Much appreciated!
Wow, seriously, thank you, it helped me, blessings