How to Retrieve Run Steps Logs and Messages of OpenaAI Assistant Using JavaScript API

Su Myat Hlaing 120 Reputation points
2024-06-20T05:01:14.08+00:00

Hello,

I'm currently working with the Assistant feature in Azure OpenAI Studio and I've noticed that when using the Assistant, it shows run steps logs and messages between interactions before providing the final answer. These logs and messages are very useful for understanding the process and debugging purposes.

I want to achieve the same functionality using the JavaScript API. Specifically, I would like to:

  1. Retrieve the run steps logs.
  2. Capture the intermediary messages exchanged before the final answer is provided.

https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/openai/openai-assistants/samples-dev/codeAssistant.ts
While this code successfully generates a completion, it does not provide the run steps logs or the intermediary messages.

Could someone guide me on how to properly retrieve these logs and messages using the JavaScript API? Are there specific endpoints or configurations required to achieve this?

Any help or pointers would be greatly appreciated!

Thank you!
User's image

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,528 questions
{count} votes