cpacker / MemGPT

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

load_file_into_source giving error #1521

Open tiro2000 opened 1 month ago

tiro2000 commented 1 month ago

Describe the bug I am trying the code example to use client to attach source to an agent, I had initially to load_file_into_source which is giving following error :

backend\memgpt_test.py", line 300, in main() \Lib\site-packages\memgpt\client\client.py", line 551, in load_file_into_source raise ValueError(f"Job failed: {job.metadata}") ValueError: Job failed: MetaData()

Please describe your setup

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

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 context_window = 8192

[embedding] embedding_endpoint_type = hugging-face embedding_endpoint = https://embeddings.memgpt.ai embedding_model = BAAI/bge-large-en-v1.5 embedding_dim = 1024 embedding_chunk_size = 300

[archivalstorage] type = chroma path = C:\Users\king.memgpt\chroma

[recallstorage] type = sqlite path = C:\Users\king.memgpt

[metadatastorage] type = sqlite path = C:\Users\king.memgpt

[version] memgpt_version = 0.3.15

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


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

Local LLM details

If you are trying to run MemGPT with local LLMs, please provide the following information:

sarahwooders commented 1 month ago

Thanks for sharing this! Can you share any log outputs from the server you're running at http://localhost:8283/?

tiro2000 commented 1 month ago

@sarahwooders Thanks for your quick response, the server is giving after the long heart beat ( inner thoughts ) message , the following ( let me know if you want me to share that long message too ) b552-6ba1a47476c2']}}] INFO: ::1:56654 - "GET /api/agents HTTP/1.1" 200 OK INFO: ::1:56659 - "GET /api/sources HTTP/1.1" 200 OK INFO: ::1:56660 - "POST /api/sources/59a56411-6276-40ee-b105-5cbf06a71bcf/upload HTTP/1.1" 200 OK

I/O operation on closed file.

INFO: ::1:56661 - "GET /api/sources/status/0e81a1ef-ae3a-4507-acbc-b5c56fc9fe0a HTTP/1.1" 200 OK INFO: ::1:56670 - "GET /api/models?user_id=00000000-0000-0000-0000-000000000000 HTTP/1.1" 200 OK INFO: ::1:56673 - "GET /api/tools HTTP/1.1" 200 OK INFO: ::1:56671 - "GET /api/humans?user_id=00000000-0000-0000-0000-000000000000 HTTP/1.1" 200 OK INFO: ::1:56672 - "GET /api/personas?user_id=00000000-0000-0000-0000-000000000000 HTTP/1.1" 200 OK 2024-07-07 21:46:56,589 - memgpt.server.server - INFO - Checking for agent user_id=00000000-0000-0000-0000-000000000000 agent_id=95ae51d3-e5e2-4d10-9c5d-0c0fe5e34ae0 2024-07-07 21:46:56,598 - memgpt.server.server - INFO - Retrieved 1 agents for user 00000000-0000-0000-0000-000000000000: [{'id': UUID('95ae51d3-e5e2-4d10-9c5d-0c0fe5e34ae0'), 'name': 'Clinic_Osteo_Agent', 'user_id': UUID('00000000-0000-0000-0000-000000

tiro2000 commented 1 month ago

@sarahwooders @cpacker Postman outcome included too ( Image attached ): { "created_at": "2024-07-08T10:13:18.241881", "user_id": "00000000-0000-0000-0000-000000000000", "completedat": null, "metadata": {}, "id": "69931fe4-c559-4ada-8e1d-2d450ee19173", "status": "created" }

server output : INFO: ::1:55095 - "POST /api/sources/d58fd4b6-4b64-4ed0-9185-29c2fa4988f5/upload HTTP/1.1" 200 OK I/O operation on closed file. INFO: ::1:55113 - "GET /api/sources HTTP/1.1" 200 OK INFO: ::1:55113 - "GET /data-sources HTTP/1.1" 304 Not Modified INFO: ::1:55113 - "GET /api/sources HTTP/1.1" 200 OK INFO: ::1:55116 - "GET /api/sources HTTP/1.1" 200 OK postman

tiro2000 commented 1 month ago

@sarahwooders -- Quick feedback : re-installing using Docker resolved this , but got the other issue of #1530 , after hell of attempts, has to wipe every thing, installed Docker again ( still not working ) , now I just used -pip install -U pymemgpt ( working "For Now" ). Also Not sure why not by just installing pip memgpt ( Admin, create_client ,DEFAULT_HUMAN, DEFAULT_PERSONA, DEFAULT_PRESET ) not accessible and had to install "pymemgpt " to access them "they are imported from memgpt" ( which resolved the other issue any ways ).