How to do a file search #355
-
How do I add attachments to a message? Trying to support this https://platform.openai.com/docs/assistants/tools/file-search |
Beta Was this translation helpful? Give feedback.
Answered by
StephenHodgson
Sep 14, 2024
Replies: 1 comment
-
You can either add var tools = new List<Tool>
{
Tool.FileSearch, // or
new Tool(new FileSearchOptions(20))
}; then do something like this: message = await thread.CreateMessageAsync(new(
content: "Test create message",
attachments: new[] { new Attachment(file.Id, Tool.FileSearch) }
)); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
StephenHodgson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can either add
Tool.FileSearch
to your list of tools:then do something like this: