Interface with the Tide API using natural language, powered by OpenAI API and GPT-5.1 that helps you explore, converse about and create a request to send to the chosen endpoint.
The program flow is as follows:
- Use
PromptControllerandPOST /api/promptendpoint to gauge the users intent or action. The API responds with up to 3 candidate endpoints. - Send the chosen endpoint from step 1 to the
ConversationControllerto first create a conversation object which returns the objects id and an initial response. - Send the user's message to that initial response to the
responsesendpoint to keep the conversation going. The returned object has a boolean value that represents whether the user has filled every parameter and/or that they confirm to proceed to the next step. - The
submissionendpoint is used to extract three possible actions from the user's message: Submit, Edit, or Reset. If the user doesn't answer correctly, the api will return a null for the action and a message to ask the user again. - In case of
Submitaction, the other properties of theConversationSubmissionActionobject will be filled as well with their respective values. It is now possible to send the request to the chosen endpoint, but the client has to take care of that. - The message property is always filled in.
- For other actions, only the
UserSubmissionActionwill have a value corresponding toResetorEdit.
In order to run this project, you need an OpenAI API key. That key must have access to the Responses API, File Search API, Vector Store (Files).
After you have acquired the API key, add the key as an environment variable on your system.
In Windows, you can use the GUI to edit the environment variables, but in any case the name of the variable must be correct, OPENAI_API_KEY:
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
To provide new updates to the definitions or newer Swagger document of the Tide API, use the SwaggerFileController endpoints.
The POST /api/SwaggerFile/filter-swagger-paths extracts the paths and their possible operations. You can upload a file or the API tries to find a local version which must be present in the application data folder. (On Windows: C:\Users\<user>\AppData\Roaming\Intent2API)
Highly Recommended: It also possible to upload the filtered file directly to OpenAI which can then be used by the Responses API to query new definitions.
This project serves as the backend for the frontend chatbot project, which can be found here.