Forge.OpenAI
Forge.OpenAI copied to clipboard
String Constants for Assistants API
This is a feature request.
It would be great if Forge.OpenAI had string constants defined for:
- RunResponse.Status . They are documented here: https://platform.openai.com/docs/assistants/how-it-works/runs-and-run-steps It would also be nice to have a method "IsTerminalState" that takes a state and returns true if the state is "expired", "completed", "failed" or "cancelled".
- Message.Role - there are "system", "user" and "assistant".
This request is similar to what is already in place for Content.CONTENT_TYPE_XXXX
Feel free to close this request if it's out of scope.
As I see now in the API doc, only the "user" is supported as role value in the Message: https://platform.openai.com/docs/api-reference/messages/createMessage#messages-createmessage-role
For the point one, I recommend you to create extension methods where you can implement additional methods which can fit for your workflow.
"user" is the only the only value that an end-user of the API can specify on a message BUT when I examine a List of messages (for a Run), I will encounter "system" and "assistant" messages. The "assistant" messages contain the model's responses.
I see, than I add them as constants into the response. In the next version.