I have a simple code of an API using Fast API, Websocket and OpenAI. The ideia is make a real time chat. Everything is working vey good, but the OpenAI can’t access/find files in storage (Vector Storage) to answer the chat based on it.
I’ve been trying so many things, but nothing worked.
with self.openai_client.beta.threads.runs.stream(
# model='gpt-4-turbo',
thread_id = self.thread.id,
assistant_id = os.environ["OPENAI_API_ASSISTANT_ID"],
event_handler = EventHandler(self.openai_client),
# tools=[{"type": "retrieval"}],
) as stream:
return stream.get_final_messages()