I want to use an assistant that I’ve created but I want to handle all the message and thread management myself.
Is there an API call I can make that similar to a vanilla open ai api call but having the response come from my assistant?
I’m looking for something like this but also being able to specify the assistant ID.
const apiRequestBody = {
model: "gpt-3.5-turbo",
messages: [{ role: "system", content: systemPrompt }, ...apiMessages],
};
const response = await fetch(openAIUrl, {
method: "POST",
headers: {
"Authorization": `Bearer ${openAI_API_Key}`,
"Content-Type": "application/json",
},
body: JSON.stringify(apiRequestBody),
});