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

feat: refactor the POST agent/messages API to take multiple messages #1882

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

cpacker
Copy link
Collaborator

@cpacker cpacker commented Oct 14, 2024

  • POST /agents/messages now hits server.send_messages which accepts a list properly
  • POST /agents/messages now accepts types List[Message] in addition to List[MessageCreate]
  • MessageCreate has been limited to only accepting roles user and system, because it's too complex to allow the user to create other roles on the POST (might as well just require them to create Messages instead)
    • for example, user wants to send an assistant message in the list that has a message "hey how's it going chad", but they don't realize that they can't put that in content, but need to put it inside tool_calls as the kwarg to a send_message function, etc...

Please describe the purpose of this pull request.
Is it to add a new feature? Is it to fix a bug?

How to test
How can we test your PR during review? What commands should we run? What outcomes should we expect?

Have you tested this PR?
Have you tested the latest commit on the PR? If so please provide outputs from your tests.

Related issues or PRs
Please link any related GitHub issues or PRs.

Is your PR over 500 lines of code?
If so, please break up your PR into multiple smaller PRs so that we can review them quickly, or provide justification for its length.

Additional context
Add any other context or screenshots about the PR here.

@sarahwooders sarahwooders merged commit 6fc2fee into main Oct 14, 2024
16 checks passed
@cpacker cpacker deleted the refactor-post-messages-api branch October 16, 2024 03:55
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

Successfully merging this pull request may close these issues.

2 participants