I am developing a chatbot for my company, and I have created middleware in Spring Boot to access my assistant using API calls (make a thread and send messages on it, create a run and then receive a message response from the assistant, get all messages in the thread, etc). The middleware accesses api endpoints to interact with the assistant. However, now I want the assistant to make an external api call from the user’s input, and then feed back the user the response to the api call in a message response from the assistant.
I created a function in the assistants ui and gave it a json definition. I want to implement the function and the api call in my Spring Boot application, because I know I can’t do it in the openai assistants api ui itself. What is the formatting of how to do this in Spring Boot?
I tried defining an endpoint for the function in my json as a separate field, and then defining the function at that endpoint, but nothing happened and the assistant froze up. I see that most tutorials on how to implement functions are using the OpenAI SDK to even create the assistant in the first place. If I am trying to implement an external api call with an assistant that I have already created and want to use in openai assistants api ui, then what do I do?
I am also having trouble defining the endpoint in the json structure for the function, which makes me wonder how the assistant will even access or get to the function in the middleware.
Thanks for any help.
Mikhail Saveliev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.