-
Notifications
You must be signed in to change notification settings - Fork 4
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 : adds metadata filtering #48
Conversation
WalkthroughThe recent updates across several Java files primarily enhance functionality by integrating user metadata and refining API responses. Key changes include the addition of user IDs in text segments, the introduction of optional user parameters in query methods, and the use of advanced filtering techniques in embedding search methods. Additionally, there's a new configuration for managing date functions and a modification in chat settings in the AI services. Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (9)
- embeddingstores/pgvector-langchain4j/src/main/java/com/learning/ai/config/Initializer.java (2 hunks)
- embeddingstores/pgvector-langchain4j/src/main/java/com/learning/ai/config/SwaggerConfig.java (1 hunks)
- embeddingstores/pgvector-langchain4j/src/main/java/com/learning/ai/controller/QueryController.java (1 hunks)
- embeddingstores/pgvector-langchain4j/src/main/java/com/learning/ai/service/PgVectorStoreService.java (2 hunks)
- embeddingstores/pgvector-langchain4j/src/test/java/com/learning/ai/controller/TestQueryController.java (1 hunks)
- rag/rag-langchain4j-AllMiniLmL6V2-llm/src/main/java/com/learning/ai/service/CustomerSupportService.java (2 hunks)
- rag/rag-springai-openai-llm/src/main/java/com/learning/ai/llmragwithspringai/config/FunctionConfiguration.java (1 hunks)
- rag/rag-springai-openai-llm/src/main/java/com/learning/ai/llmragwithspringai/service/AIChatService.java (2 hunks)
- rag/rag-springai-openai-llm/src/main/resources/application.properties (1 hunks)
Files skipped from review due to trivial changes (2)
- embeddingstores/pgvector-langchain4j/src/main/java/com/learning/ai/config/SwaggerConfig.java
- rag/rag-springai-openai-llm/src/main/resources/application.properties
Additional comments not posted (7)
rag/rag-springai-openai-llm/src/main/java/com/learning/ai/llmragwithspringai/config/FunctionConfiguration.java (1)
16-21
: The implementation ofcurrentDateFunction
is concise and correctly utilizes Spring's@Bean
annotation. Good use of logging for traceability.embeddingstores/pgvector-langchain4j/src/main/java/com/learning/ai/controller/QueryController.java (1)
21-22
: The updated signature ofqueryEmbeddedStore
to include an optionaluserId
parameter enhances user-specific query capabilities. Well-integrated change.embeddingstores/pgvector-langchain4j/src/main/java/com/learning/ai/config/Initializer.java (1)
24-31
: The inclusion of user-specific metadata inTextSegment
instances aligns with the PR's objectives of enhancing metadata handling. The implementation is correct and clear.embeddingstores/pgvector-langchain4j/src/test/java/com/learning/ai/controller/TestQueryController.java (1)
16-37
: The test methods added are comprehensive and correctly validate the new functionalities related to user-specific queries. Good use of@Disabled
for known issues awaiting fixes.rag/rag-langchain4j-AllMiniLmL6V2-llm/src/main/java/com/learning/ai/service/CustomerSupportService.java (1)
32-37
: The refactoring of thechat
method to useEmbeddingSearchRequest
andEmbeddingSearchResult
enhances the modularity and scalability of the service. Correctly implemented.embeddingstores/pgvector-langchain4j/src/main/java/com/learning/ai/service/PgVectorStoreService.java (1)
30-45
: The enhancements toqueryEmbeddingStore
to include user-specific filtering usingMetadataFilterBuilder
are well-implemented and align with the PR's objectives of improving metadata handling.rag/rag-springai-openai-llm/src/main/java/com/learning/ai/llmragwithspringai/service/AIChatService.java (1)
58-60
: The integration ofOpenAiChatOptions
to dynamically specify options during prompt creation in thechat
method enhances the configurability and adaptability of the AI service. Well-implemented change.
No description provided.