cpacker / MemGPT

Create LLM agents with long-term memory and custom tools 📚🦙
https://memgpt.readme.io
Apache License 2.0
11.36k stars 1.23k forks source link

Non-streaming requests will block #1601

Open a67793581 opened 1 month ago

a67793581 commented 1 month ago

Describe the bug

Non-streaming requests will block

requests: { "message": "aaa", "role": "user", "stream": false, "timestamp": "2024-08-01T14:42:14+01:00" }

Please describe your setup

[ x ] How did you install memgpt? git clone [ x ] Describe your setup OS macOS Terminal Screenshots

Additional context

image

self._step throws an exception

 def user_message

        # Run the agent state forward
        usage = self._step(user_id=user_id, agent_id=agent_id, input_message=packaged_user_message, timestamp=timestamp)
        return usage

Did not go through the following process

def send_message_to_agent
    except Exception as e:
        print(e)
        import traceback

        traceback.print_exc()
        raise HTTPException(status_code=500, detail=f"{e}")

MemGPT Config

[defaults] preset = memgpt_chat persona = sam_pov human = basic

[model] model = gpt-4o model_endpoint = https://api.openai.com/v1 model_endpoint_type = openai model_wrapper = null context_window = 8192

[embedding] embedding_endpoint_type = openai embedding_endpoint = https://api.openai.com/v1 embedding_model = text-embedding-ada-002 embedding_dim = 1536 embedding_chunk_size = 300

[archival_storage] type = postgres path = /root/.memgpt/chroma uri = postgresql+pg8000://memgpt:memgpt@localhost:5432/memgpt

[recall_storage] type = postgres path = /root/.memgpt uri = postgresql+pg8000://memgpt:memgpt@localhost:5432/memgpt

[metadata_storage] type = postgres path = /root/.memgpt uri = postgresql+pg8000://memgpt:memgpt@localhost:5432/memgpt

[client] anon_clientid = 00000000-0000-0000-0000-000000000000

If you're not using OpenAI, please provide additional information on your local LLM setup:

not use Local LLM

a67793581 commented 1 month ago

1590

I found that it should be the same as this issue