Skip to content

Commit

Permalink
resolve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
crisjy committed Jan 14, 2025
1 parent 8de828d commit 0490feb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/langchain-azure-cosmosdb/src/chat_histories/mongodb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ export class AzureCosmosDBMongoChatMessageHistory extends BaseListChatMessageHis

async getAllSessions(): Promise<ChatSessionMongo[]> {
await this.initialize();
const documents = await this.collection.find().toArray();
const documents = await this.collection.find({
[ID_USER]: this.userId,
}).toArray();

const chatSessions: ChatSessionMongo[] = documents.map((doc) => ({
id: doc[ID_KEY],
Expand Down

0 comments on commit 0490feb

Please sign in to comment.