wenjin272 commented on PR #332:
URL: https://github.com/apache/flink-agents/pull/332#issuecomment-3595429303

   Hi, @alnzng. There's a design issue related to the vector store that I'd 
appreciate your help reviewing.
   
   As describe in the design doc #339, long-term memory of flink-agents is also 
based on vector store. Currently, I provide an implementation based on chroma. 
In this implementation, I directly use chroma client rather than flink-agents 
`BaseVectorStore`, because there are some long-term memory needed interface not 
provided in `BaseVectorStore`.
   
   @xintongsong believes that we can directly build upon the Flink-Agents 
`BaseVectorStore`. Thus, we can support using any already supported vector 
store as the backend for long-term memory.
   
   I think this make sense, but it requires add some interfaces to 
`BaseVectorStore`, which maybe look like:
   ```
   def get_or_create_collection(self, name: str, metadata: Dict[str, Any]) -> 
Dict[str, Any]:
       """Get a collection, create if it doesn't already exist."""
       
   def get_collection(self, name: str) -> None:
       """Get an existing collection."""
       
   def update_collection(self, name: str, metadata: Dict[str, Any]) -> None:
       """Update an existing collection."""
   
   def delete_collection(self, name: str) -> bool:
       """Delete a collection."""
       
   def add(self, document: Document, collection_name: str | None = None) -> 
None:
       """Add a document to the collection."""
   
   def update(self, document: Document, collection_name: str | None = None) -> 
None:
       """Update a document, can only update metadata."""
   
   def delete(self, offset: int | None, limit: int | None, ids: List[int] | 
None = None, **kwargs: Any) -> bool:
       """Delete documents from collection."""
   
   def get(self, offset: int | None, limit: int | None, collection_name: str | 
None = None, **kwargs: Any) -> List[Document]:
       """Get documents from collection."""
   ```
   
   WDTY?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to