Closed leehuwuj closed 1 month ago
Latest commit: a29ddb8c3e5018f87a49eeaf9ac9d9d0349b84f5
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
This set of changes enhances the integration of the Weaviate vector database into a Python application, focusing on efficient handling of vector embeddings. Key improvements include new filtering capabilities for document retrieval, support for environment variable configurations, and streamlined control flow in FastAPI routes. The singleton management for the Weaviate client promotes resource efficiency, while new functions increase flexibility in querying and managing document visibility.
Files | Summary |
---|---|
.changeset/great-games-behave.md | Introduces Weaviate vector database support, enabling efficient vector data management, CRUD operations, and similarity search capabilities. |
helpers/env-variables.ts, helpers/python.ts | Adds environment variable handling for Weaviate configuration and manages additional dependencies related to Weaviate in Python. |
helpers/types.ts | Expands the TemplateVectorDB type to include "weaviate," enhancing flexibility in database representation. |
questions.ts | Introduces "Weaviate" as a new option for vector databases in the getVectorDbChoices function. |
templates/components/vectordbs/python/llamacloud/query_filter.py, | Implements a function for generating document filters based on visibility and specific IDs, enhancing querying capabilities in vector stores. |
templates/components/vectordbs/python/weaviate/query_filter.py, | Similar functionality for Weaviate, utilizing MetadataFilter and accommodating current limitations in Weaviate's filtering capabilities. |
templates/components/vectordbs/python/weaviate/vectordb.py | Establishes a client management system for Weaviate, ensuring efficient connection handling and retrieval of the Weaviate vector store. |
templates/components/vectordbs/typescript/llamacloud/queryFilter.ts, | Introduces TypeScript function for generating document filters, supporting dynamic retrieval based on document IDs. |
templates/types/streaming/express/src/controllers/engine/queryFilter.ts, | Similar functionality for Express, creating flexible filters for document retrieval. |
templates/types/streaming/fastapi/app/api/routers/chat.py, | Removes generate_filters function, streamlining chat routing logic, and updates logging for better clarity. |
templates/types/streaming/fastapi/app/api/routers/chat_config.py | Implements chat configuration endpoints, allowing dynamic retrieval of conversation starters and integration with LlamaCloud services. |
templates/types/streaming/fastapi/app/api/routers/vercel_response.py | Updates serialization method for source nodes in chat response generation. |
templates/types/streaming/fastapi/app/engine/query_filter.py | Introduces a new function for generating filters based on document IDs, enhancing querying capabilities. |
templates/types/streaming/nextjs/app/api/chat/engine/queryFilter.ts | Defines function for creating flexible document filters based on privacy status and document IDs in a Next.js application. |
sequenceDiagram
participant User
participant ChatAPI
participant WeaviateClient
participant VectorStore
User->>ChatAPI: Request chat with filters
ChatAPI-->>WeaviateClient: Retrieve filters
WeaviateClient-->>VectorStore: Apply filters
VectorStore-->>WeaviateClient: Return filtered documents
WeaviateClient-->>ChatAPI: Send filtered results
ChatAPI-->>User: Display chat results
π° In a world of vectors, oh so bright,
I hop with glee, what a wonderful sight!
Weaviate's here, with filters that sing,
Managing data, oh what joy it brings!
With each new change, I dance and play,
Celebrating code in a whimsical way! β¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Enhancements
Refactor
Bug Fixes