-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(azure-cosmosdb): add session context and retrieve all sessions for a user #7242
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Should we add this in example or doc-comment to let the user know that they have the option to add context in input?
Otherwise, this PR LGTM.
hey @sinedied, Jacob suggested to prefer RunnableWithMessageHistory. |
Good callout! I'll update the example with the new methods. |
@aditishree1 I completed the code example with the new APIs usage. I also had to fix a few types in the vector search integration due to the updated Cosmos SDK. |
We have been leaning more and more on LangGraph as the memory abstraction of choice (you are defining a state with whatever keys you want) but if you need to stay in LangChain then |
@@ -195,7 +197,7 @@ export class AzureCosmosDBNoSQLVectorStore extends VectorStore { | |||
{ | |||
path: "/vector", | |||
type: "quantizedFlat", | |||
}, | |||
} as VectorIndex, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe as const
works but not a huge deal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it but it still complained 😞
@jacoblee93 @aditishree1 I've reworked how the helper methods works so it makes more sense, and fixed handling of existing context in a session. |
context
object saved along the session. This can be used for example to give a title or save any additional properties along with a session.@jacoblee93 Not directly related to the PR, but I've found some memory integration that uses
RunnableWithMessageHistory
like ours, and other usingBufferMemory
which one is the recommended approach? Thanks