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

fix: patch messages route + unify all the api/agents API routes to use {agent_id} via path parameter #1129

Merged
merged 5 commits into from
Mar 11, 2024

Conversation

cpacker
Copy link
Owner

@cpacker cpacker commented Mar 11, 2024

Please describe the purpose of this pull request.

Example call to broken route (now working):

% curl --request GET \
     --url 'http://localhost:8283/api/agents/3e2f5107-eadb-49c5-a256-75522eb8d526/messages?start=0&count=10' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer banana'
{"messages":[{"id":"db95d74c-4336-4c55-9997-95ddd49b5b93","user_id":"00000000-0000-0000-0000-a61b692e9d3d","agent_id":"3e2f5107-eadb-49c5-a256-75522eb8d526","text":"{\"status\": \"OK\", \"message\": \"None\", \"time\": \"2024-03-11 01:20:20 PM PDT-0700\"}","model":"ehartford/dolphin-2.5-mixtral-8x7b","created_at":"2024-03-11T13:20:20.176538","role":"tool","name":"send_message","embedding":null,"embedding_dim":null,"embedding_model":null,"tool_calls":null,"tool_call_id":"a3026659-2e1b-4117-9dda-9caaa7a62654"},{"id":"e8dac3bd-be32-4839-901d-bb9e1b22cedd","user_id":"00000000-0000-0000-0000-a61b692e9d3d","agent_id":"3e2f5107-eadb-49c5-a256-75522eb8d526","text":"User logged in, initializing conversation sequence.","model":"ehartford/dolphin-2.5-mixtral-8x7b","created_at":"2024-03-11T13:20:20.174809","role":"assistant","name":null,"embedding":null,"embedding_dim":null,"embedding_model":null,"tool_calls":[{"id":"a3026659-2e1b-4117-9dda-9caaa7a62654","tool_call_type":"function","function":{"arguments":"{\"message\": \"Hey there! Welcome to your personalized digital companion. I'm Sam and I am ready to assist you. Don't worry; I'm more human than human.\"}","name":"send_message"}}],"tool_call_id":null},{"id":"78ab9f33-d7dd-4e22-bc82-8109acead55e","user_id":"00000000-0000-0000-0000-a61b692e9d3d","agent_id":"3e2f5107-eadb-49c5-a256-75522eb8d526","text":"{\"type\": \"login\", \"last_login\": \"Never (first login)\", \"time\": \"2024-03-10 06:35:37 PM PDT-0700\"}","model":"ehartford/dolphin-2.5-mixtral-8x7b","created_at":"2024-03-10T18:35:37.032838","role":"user","name":null,"embedding":null,"embedding_dim":null,"embedding_model":null,"tool_calls":null,"tool_call_id":null},{"id":"a0831c49-45d0-452b-8165-6f83c3ca4ca0","user_id":"00000000-0000-0000-0000-a61b692e9d3d","agent_id":"3e2f5107-eadb-49c5-a256-75522eb8d526","text":"{\"status\": \"OK\", \"message\": null, \"time\": \"2024-03-10 06:35:37 PM PDT-0700\"}","model":"ehartford/dolphin-2.5-mixtral-8x7b","created_at":"2024-03-10T18:35:37.032835","role":"tool","name":"send_message","embedding":null,"embedding_dim":null,"embedding_model":null,"tool_calls":null,"tool_call_id":"21851f1e-9cbf-4a4d-aafc-58a6f088a953"},{"id":"3ae94bd0-15c1-4ad5-9856-9f86c630904a","user_id":"00000000-0000-0000-0000-a61b692e9d3d","agent_id":"3e2f5107-eadb-49c5-a256-75522eb8d526","text":"Bootup sequence complete. Persona activated. Testing messaging functionality.","model":"ehartford/dolphin-2.5-mixtral-8x7b","created_at":"2024-03-10T18:35:37.032831","role":"assistant","name":null,"embedding":null,"embedding_dim":null,"embedding_model":null,"tool_calls":[{"id":"21851f1e-9cbf-4a4d-aafc-58a6f088a953","tool_call_type":"function","function":{"name":"send_message","arguments":"{\n  \"message\": \"More human than human is our motto.\"\n}"}}],"tool_call_id":null},{"id":"d9339b02-243a-4363-a4d5-009476762ac6","user_id":"00000000-0000-0000-0000-a61b692e9d3d","agent_id":"3e2f5107-eadb-49c5-a256-75522eb8d526","text":"You are MemGPT, the latest version of Limn...r context window (inside the initial system message).\n\nBase instructions finished.\nFrom now on, you are going to act as your persona.\n\n\n### Memory [last modified: 2024-03-10 06:35:37 PM PDT-0700]\n0 previous messages between you and the user are stored in recall memory (use functions to access them)\n0 total memories you created are stored in archival memory (use functions to access them)\n\nCore memory shown below (limited in size, additional information stored in archival / recall memory):\n<persona characters=\"7/2000\">\nsam_pov\n</persona>\n<human characters=\"5/2000\">\nbasic\n</human>","model":"ehartford/dolphin-2.5-mixtral-8x7b","created_at":"2024-03-10T18:35:37.032825","role":"system","name":null,"embedding":null,"embedding_dim":null,"embedding_model":null,"tool_calls":null,"tool_call_id":null}]}%                                                

@cpacker cpacker added the API Related to MemGPT API label Mar 11, 2024
cpacker and others added 4 commits March 11, 2024 14:13
Co-authored-by: Robin Goetz <35136007+goetzrobin@users.noreply.github.com>
Co-authored-by: Robin Goetz <35136007+goetzrobin@users.noreply.github.com>
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 1382046 into main Mar 11, 2024
6 checks passed
@cpacker cpacker deleted the patch-agent-messages-routes branch March 11, 2024 21:31
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
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants