How to enable file search for realtime conversation? #409
Answered
by
StephenHodgson
TypeDefinition
asked this question in
Q&A
-
|
Hi there! I am trying to give my realtime AI some files to reference so that it can get background knowledge of the character it is playing. I am able to upload the files and create a vector store, but I am not sure how to enable the AI to access the vector store. Currently, this is how I am trying to get the AI to use file search: private void GetNextActorReponse() {
// Request the next actor to send a reply.
int index = actorResponseOrder.Dequeue();
List<OpenAI.Tool> fileSearchTools = new List<OpenAI.Tool>();
fileSearchTools.Add(OpenAI.Tool.FileSearch);
RealtimeResponseCreateParams realtimeResponseCreateParams = new RealtimeResponseCreateParams(tools: fileSearchTools, toolChoice: "{\"type\": \"function\", \"function\": {\"name\": \"file_search\"}}");
actorSessions[index].SendAsync(new CreateResponseRequest(realtimeResponseCreateParams), destroyCancellationToken);
}But I am getting the error: Any help would be greatly appreciated, thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
StephenHodgson
Sep 25, 2025
Replies: 1 comment 1 reply
-
|
I'm unsure if it works for realtime. Only assistants |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
TypeDefinition
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm unsure if it works for realtime. Only assistants