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: add Preset routes to API + patch for tool_call_id max length OpenAI error #1165

Merged
merged 21 commits into from
Mar 21, 2024

Conversation

cpacker
Copy link
Collaborator

@cpacker cpacker commented Mar 19, 2024

patch for tool_call_id max length OpenAI

Separately - this PR patches a new error introduced by an update to the OpenAI API, where they now require tool_call_id to be <= 29 characters.

To fix this, the generate tool call ID helper function now trims a UUID to the max (OpenAI) length. For existing messages / Message objects, we now trim the strings at "runtime" (.to_openai_dict() time) to the max length.

add Preset routes to API

Please describe the purpose of this pull request.

Implement the following functions:

  • List all available presets
  • Create a new preset
  • Delete a preset
    - [ ] Update a preset

How to test

  • Manually test REST
  • Add routes to Python client
  • Add routes to Python client unit tests

Have you tested this PR?

Manual testing:

image image

@cpacker cpacker added the API Related to MemGPT API label Mar 19, 2024
@cpacker cpacker changed the title feat: add Preset routes to API feat: add Preset routes to API + patch for tool_call_id max length OpenAI error Mar 20, 2024
Copy link
Collaborator

@sarahwooders sarahwooders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@cpacker cpacker merged commit 89cc4b9 into main Mar 21, 2024
5 checks passed
@cpacker cpacker deleted the preset-routes branch March 21, 2024 00:05
mattzh72 pushed a commit that referenced this pull request Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Related to MemGPT API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants