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

Knowledge graph category fix #2119

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kingbootoshi
Copy link

Description

These changes update the knowledge graph PR fix (#2073) and allows us to add/search memories with additional filters of run_id, and agent_id

previously, we were only allowed to add/search graph memories via user_id, which is super restrictive for me.

I use agent_id to identify my unique agent's memory, then run_id as a specific category for my agents (general_knowledge, self_knowledge, user_specific knowledge) if the category is user_specific, THEN i use user_id to sort by the unique user_id

This way, if i wanted the AI to be able to search for the most relevant information about ALL the people it meets, then I can sort memories by agent_id and run_id = "user_specific_knowledge"

so if I'm asking about user 1, EVEN if I'm not talking to user 1, the AI agent will be able to find relevant memories
image

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

By using

test_add = m.add("In the spirit realm, pastimes can include practicing shadow magic, chasing ethereal butterflies, and having floating tea parties", agent_id="test_agent", run_id="test_run", user_id="test_user")

test_search = m.search(search_query, agent_id="test_agent", run_id="test_run", user_id="test_user")

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Please delete options that are not relevant.

  • Unit Test

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@CLAassistant
Copy link

CLAassistant commented Jan 3, 2025

CLA assistant check
All committers have signed the CLA.

@Dev-Khant
Copy link
Member

Hey @kingbootoshi Can you please resolve the merge conflicts?

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.

3 participants