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

Added FalkorDB Chat History Support i.e implemenation, tests, and example notebook #26657

Closed
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
e78508f
Added FalkorDB Chat History Support i.e implemenation, tests, and exa…
kingtroga Sep 19, 2024
dc918a9
Added review changes
kingtroga Oct 2, 2024
57f5814
added an index on the id property
kingtroga Oct 4, 2024
2eb1327
removed the redundant WHERE clauses
kingtroga Oct 7, 2024
b74d0d1
removed session_id
kingtroga Oct 10, 2024
b4d527e
Merge branch 'master' into falkordbchatmessagehistorycreation
efriis Nov 7, 2024
1b497f9
Merge branch 'master' into falkordbchatmessagehistorycreation
kingtroga Nov 9, 2024
a9831ae
Fixed the CI and CD errors
kingtroga Nov 9, 2024
e076684
Fix more errors
kingtroga Nov 9, 2024
2ce8425
added redis
kingtroga Nov 9, 2024
1c3eca8
trying to fix the import error
kingtroga Nov 9, 2024
c95ccdd
here we go again
kingtroga Nov 9, 2024
73edb06
last try before I go to bed
kingtroga Nov 9, 2024
ebc4732
FIX CI CD ERRORS AGAIN
kingtroga Nov 11, 2024
4d67430
😑
kingtroga Nov 11, 2024
8ac5d8b
Fix again
kingtroga Nov 11, 2024
c297bb7
Fix Cd libs/community/ make test errors
kingtroga Nov 11, 2024
e36031d
Merge branch 'master' into falkordbchatmessagehistorycreation
kingtroga Nov 17, 2024
102f826
last fix for tonight
kingtroga Nov 17, 2024
983dc71
Merge branch 'master' into falkordbchatmessagehistorycreation
kingtroga Nov 19, 2024
2a2d1fc
Fix Redis error
kingtroga Nov 19, 2024
78dbae6
Fixed
kingtroga Nov 24, 2024
c3b770d
Merge branch 'master' into falkordbchatmessagehistorycreation
kingtroga Nov 24, 2024
fc32743
Poetry Lock fix
kingtroga Nov 24, 2024
aae00ff
Poetry lock fix
kingtroga Nov 24, 2024
e2b08f9
Poetry lock fix
kingtroga Nov 24, 2024
d6f1b96
Merge branch 'master' into falkordbchatmessagehistorycreation
kingtroga Nov 27, 2024
012a350
Merge branch 'master' into falkordbchatmessagehistorycreation
kingtroga Nov 27, 2024
8fb4424
fix poetry lock
kingtroga Nov 27, 2024
b9b5208
Merge branch 'master' into falkordbchatmessagehistorycreation
kingtroga Nov 27, 2024
2d7e138
fix poetry lock
kingtroga Nov 27, 2024
6fdb10a
Merge branch 'master' into falkordbchatmessagehistorycreation
efriis Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed the redundant WHERE clauses
kingtroga committed Oct 7, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2eb13272c76bc6aee6594b976ccb2d182cf058e4
Original file line number Diff line number Diff line change
@@ -156,7 +156,7 @@ def messages(self) -> List[BaseMessage]:
"""
query = (
f"MATCH (s:{self._node_label})-[:LAST_MESSAGE]->(last_message) "
"WHERE s.id = $session_id MATCH p=(last_message)<-[:NEXT*0.."
"MATCH p=(last_message)<-[:NEXT*0.."
f"{self._window*2}]-() WITH p, length(p) AS length "
"ORDER BY length DESC LIMIT 1 UNWIND reverse(nodes(p)) AS node "
"RETURN {data:{content: node.content}, type:node.type} AS result"
@@ -212,7 +212,6 @@ def clear(self) -> None:
"""
query = (
f"MATCH (s:{self._node_label})-[:LAST_MESSAGE|NEXT*0..]->(m:Message) "
"WHERE s.id = $session_id "
"WITH m DELETE m"
)
self._database.query(query, {"session_id": self._session_id})
kingtroga marked this conversation as resolved.
Show resolved Hide resolved