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

refactor: move API to standardized pydantic schemas across CLI, Python client, REST server #1579

Merged
merged 162 commits into from
Aug 17, 2024

Conversation

sarahwooders
Copy link
Collaborator

@sarahwooders sarahwooders commented Jul 27, 2024

Please describe the purpose of this pull request.
Update memgpt/sever/server.py functions to match standard schemas:

Agents

  • create_agent
  • update_agent
    • system prompt
    • core memory
    • message IDs
    • tools
    • name
    • description
  • delete_agent
  • get_agent_id
  • get_agent
  • list_agents

Sources (#1594)

  • create_source
  • update_source
  • delete_source
  • attach_source
  • get_source_id
  • get_source
  • list_sources

Memory

  • get_memory
  • get_archival_memory_summary
  • get_recall_memory_summary
  • get_in_context_messages
  • get_messages_paginated
  • get_passages_paginated

Memory Blocks

  • create_block (replaces human/persona)
  • delete_block (replaces human/persona)
  • update_block (replaces human/persona)
  • get_block_id
  • get_block
  • list_blocks

Tools

  • create_tool
  • update_tool
  • delete_tool
  • get_tool_id
  • get_tool
  • list_tools

Additionally, this include two new features:

  • Integration with CrewAI tools
    • Add -E crewai-tools extra to package
  • Persisted memory blocks for agents

How to test

Make original integration tests work again

  • test_admin_client.py
  • test_client.py
    • postgres backend
    • chroma + sqlite backend
  • test_endpoints.py
  • test_storage.py
  • Update MemGPT proxy to not require UUIDs

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.

Copy link
Collaborator

@norton120 norton120 left a comment

Choose a reason for hiding this comment

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

really expecting to see the structure emerging!

memgpt/schemas/message.py Show resolved Hide resolved
@sarahwooders sarahwooders changed the title feat: move API to standardized pydantic schemas across CLI, Python client, REST server refactor: move API to standardized pydantic schemas across CLI, Python client, REST server Aug 15, 2024
Copy link
Collaborator

@cpacker cpacker left a comment

Choose a reason for hiding this comment

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

image

mother of god 😳

@cpacker cpacker merged commit f2dfa79 into main Aug 17, 2024
11 checks passed
@cpacker cpacker deleted the refactor-api branch September 3, 2024 02:30
mattzh72 pushed a commit that referenced this pull request Oct 9, 2024
…n client, REST server (#1579)

Co-authored-by: cpacker <packercharles@gmail.com>
Co-authored-by: matthew zhou <matthewzhou@matthews-MacBook-Pro.local>
Co-authored-by: Zack Field <field.zackery@gmail.com>
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.

4 participants