Discussions

Ask a Question
Back to All

Guidance Required: Implementing API Calls in Copilot for a Basic Query-Response Function

Dear all,

I apologize for any inconvenience this query may cause.

I have been an avid enthusiast of Copilot for a considerable time, and I am now seeking to leverage its API (via REST API calls, likely in PHP) to implement a straightforward function. This function should take a string (a question) as input and return Copilot's response as output.

Could anyone guide me on the sequence, order, and types of API calls required to achieve this?

For context, I have previously developed a similar procedure using OpenAPI. In that scenario, the sequence involved opening a thread, creating a message, assigning the message to the thread, executing the thread, reading the messages, and finally closing the thread.

I am particularly eager to transition to Copilot and would greatly appreciate any insights or a rundown of the main steps involved. Given the excellent documentation on the website, I am confident I can handle the implementation once I have a clear understanding of the primary steps.

Thank you very much for your assistance, and I apologize if this question seems elementary.

Best regards,
Giuseppe