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

Clarification Needed: Unable to Locate MemGPT Class Definition in Repository #1360

Open
hjhmuser opened this issue May 9, 2024 · 2 comments

Comments

@hjhmuser
Copy link

hjhmuser commented May 9, 2024

Hello,

I am currently attempting to replicate and understand the long document QA experiments mentioned in your paper using the source code provided in this repository. However, I have encountered a stumbling block that I hope to get some clarification on.

While going through the source code, especially in the doc_qa_task where it involves using the MemGPT class, I noticed the import statement:

from memgpt import MemGPT, utils

and the instantiation in the code:

memgpt_client = MemGPT()

However, after a thorough search through the repository, I am unable to find the definition or implementation of the MemGPT class. This absence has made it challenging to understand how to proceed with setting up and running the experiments as intended.

Could you please provide guidance on where I might find the MemGPT class, or if there are any additional steps or documentation I should refer to? It's possible that I might have overlooked something or there are updates that are not yet pushed to the repository.

Thank you for your assistance and for sharing your work, which has been incredibly insightful.

@MrFCow
Copy link

MrFCow commented May 17, 2024

I believe the main export is changed, now the export is exposing the function "create_client" instead of the MemGPT class. So you can create a client like:

from memgpt import create_client
chat_client = create_client()
agent_info = chat_client.create_agent(
			name="Test Agent",
			persona="You are an agent, your alias is Johnny \
			"
		)
msg="what's your name"
response = chat_client.user_message(agent_id=agent_id, message=msg)

@raimondasl
Copy link

raimondasl commented May 27, 2024

There is a deeper issue here though:
If we call create_client() without URL, it creates LocalClient. However LocalClient does not support llm_config or embedding_config in create_agent() method that are being passed in lines 97-106 of nested_kv.py and lines 184-191 of doc_qa.py:

# Create a new Agent that models the scenario setup agent_state = memgpt_client.create_agent( { "name": agent_name, "persona": NESTED_PERSONA, "human": NESTED_HUMAN, "llm_config": config.default_llm_config, "embedding_config": config.default_embedding_config, } )

OTOH if we pass URL to create_client(), it would create RESTClient. RESTClient create_agent() method supports llm_config or embedding_config as parameters but it does not allow to override them and fails in the same place.

So, in short, current implementation does not support running nested_kv.py or doc_qa.py at all. :(

Can this be fixed?
I could try fixing it if I got pointed in the right direction. It's currently not obvious to me if the right solution is adding support of llm_config or embedding_config in create_agent() to LocalClient or we should use RESTClient and add support to override these configs in RESTClient create_agent().

Thanks.

BTW, there's a bunch of other issues with these scripts that lead to failures in other places. I have fixed some of them. If there is interest, I could fork and submit PR. However without a fix to this issue my other fixes are not really tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To triage
Development

No branches or pull requests

3 participants