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: Address exception send_message_to_agent() missing 1 required positional argument: 'stream_legacy' on 'v1/chat/completions' #1592

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

vysona-scott
Copy link
Contributor

Please describe the purpose of this pull request.
Bug fix
I am not sure that hard coding the stream_legacy to False is appropriate, open to feedback.

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

curl --location 'http://localhost:8083/v1/chat/completions' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "messages": [
        {
            "id": "UnzuNq8",
            "createdAt": "2024-07-29T14:14:10.412Z",
            "role": "user",
            "content": "ssssss"
        }
    ],
    "user": "355e3a6a-7176-42d6-a4b0-09db2d202a0f",
    "model":"gpt-4o",
    "requestData": {}
}'

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

dotenv run -- memgpt server
Using existing admin server password from environment.
User ID: 00000000-0000-0000-0000-000000000000
DEBUG False
Running: uvicorn server:app --host localhost --port 8283
INFO:     Started server process [1537306]
INFO:     Waiting for application startup.
Writing out openapi_memgpt.json file
Writing out openapi_assistants.json file
INFO:     Application startup complete.
INFO:     Uvicorn running on http://localhost:8283 (Press CTRL+C to quit)
Starting non-streaming OpenAI proxy response
MemGPT.memgpt.server.server - INFO - Grabbing agent user_id=8bae8a8c-47f5-4a36-9553-0c988464f417 agent_id=355e3a6a-7176-42d6-a4b0-09db2d202a0f from database
MemGPT.memgpt.server.server - INFO - Creating an agent object
MemGPT.memgpt.server.server - INFO - Adding agent to the agent cache: user_id=8bae8a8c-47f5-4a36-9553-0c988464f417, agent_id=355e3a6a-7176-42d6-a4b0-09db2d202a0f
Skipping message: {'internal_monologue': 'The user repeated the same question. Should check for deeper engagement or issues.', 'date': '2024-07-29T19:13:09.496714+00:00', 'id': '8059ef6d-c3ba-41f0-91c4-531c9d7cf2a4'}
Failed to parse MemGPT message: {'name': 'send_message', 'arguments': '{"message": "Hey again! I\'m still doing well. How about you? What\'s been on your mind lately?"}'}
Skipping message: {'function_return': 'None', 'status': 'success', 'id': 'ab2be711-bd76-45e3-9703-088abc3238ed', 'date': '2024-07-29T19:13:09.496934+00:00'}
INFO:     127.0.0.1:56448 - "POST /v1/chat/completions HTTP/1.1" 200 OK

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

#1591

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.

@vysona-scott vysona-scott changed the title Address exception send_message_to_agent() missing 1 required positional argument: 'stream_legacy' on 'v1/chat/completions' fix: Address exception send_message_to_agent() missing 1 required positional argument: 'stream_legacy' on 'v1/chat/completions' Jul 29, 2024
@sarahwooders sarahwooders requested a review from cpacker July 29, 2024 20:47
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.

LGTM, thank you!

@cpacker cpacker merged commit 4bfd0de into letta-ai:main Jul 30, 2024
9 of 12 checks passed
sarahwooders pushed a commit that referenced this pull request Aug 17, 2024
…sitional argument: 'stream_legacy'` on 'v1/chat/completions' (#1592)
mattzh72 pushed a commit that referenced this pull request Oct 9, 2024
…sitional argument: 'stream_legacy'` on 'v1/chat/completions' (#1592)
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