@GenixPRO Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
.
Yes, you can “write once, call anywhere” with Azure AI Assistants. See this article.
.
Once you’ve created your Assistants in the playground and have their IDs, you can call them using the Assistants API. Here’s how you can do it:
- Initialize the Assistant: Use the
assistant_id
to initialize the Assistant in your application. For example, in Python, you can use the following code snippet:
- Create a Thread: To interact with the Assistant, you need to create a thread. This thread will manage the conversation context.
thread = client.beta.threads.create(assistant_id=assistant.id)
- Run the Assistant: Once the thread is created, you can start a run to get responses from the Assistant.
run = client.beta.threads.runs.create(thread_id=thread.id, assistant_id=assistant.id)
- Handle Responses: The JSON response from the API will include a thread_id, which you can use to continue the conversation in subsequent API calls.
For more detailed information, you can refer to the Azure OpenAI Assistants documentation
.
Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.
**
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.