Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String Constants for Assistants API #13

Open
sevzas opened this issue Mar 22, 2024 · 4 comments
Open

String Constants for Assistants API #13

sevzas opened this issue Mar 22, 2024 · 4 comments

Comments

@sevzas
Copy link

sevzas commented Mar 22, 2024

This is a feature request.

It would be great if Forge.OpenAI had string constants defined for:

  1. 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".
  2. 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.

@sevzas sevzas changed the title String Constants String Constants for Assistants API Mar 22, 2024
@JZO001
Copy link
Owner

JZO001 commented Mar 22, 2024

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

@JZO001
Copy link
Owner

JZO001 commented Mar 22, 2024

For the point one, I recommend you to create extension methods where you can implement additional methods which can fit for your workflow.

@sevzas
Copy link
Author

sevzas commented Mar 22, 2024

"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.

@JZO001
Copy link
Owner

JZO001 commented Mar 22, 2024

I see, than I add them as constants into the response. In the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants