feat(rag): add HayStack RAG Integration#268
Conversation
|
|
|
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
af1e4e1 to
9f2648a
Compare
|
@AlbumenJ hi, I've submitted a PR to complete this feature. |
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive HayStack RAG integration to AgentScope-Java, enabling support for HayStack-based knowledge base retrieval alongside existing RAG providers (Dify, RAGFlow, Bailian, etc.).
Key Changes:
- New HayStack RAG extension module with client, configuration, and knowledge base implementation
- Support for both standard retrieval and SentenceWindowRetriever response formats
- Comprehensive test coverage with unit tests and mock server testing
- Documentation updates in both English and Chinese
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/en/quickstart/installation.md | Added HayStack RAG to the dependency table for English documentation |
| docs/zh/quickstart/installation.md | Added HayStack RAG to the dependency table for Chinese documentation |
| agentscope-extensions/pom.xml | Added haystack module to extensions parent POM |
| agentscope-extensions/agentscope-extensions-rag-haystack/pom.xml | New module POM with OkHttp, Jackson, and Reactor dependencies |
| HayStackConfig.java | Configuration class with retrieval parameters, filters, and HTTP settings |
| HayStackClient.java | HTTP client implementation with retry logic and reactive API |
| HayStackKnowledge.java | Main integration implementing Knowledge interface for RAG operations |
| HayStackDocumentConverter.java | Utility for converting HayStack documents to AgentScope format |
| HayStackApiException.java | Custom exception for HayStack API errors |
| Model classes (HayStackDocument, HayStackResponse, etc.) | Data models for API communication |
| FilterPolicy.java | Enum for filter merge/replace policies |
| Test files | Comprehensive unit tests for all components with MockWebServer |
| HayStackRAGExample.java | Example demonstrating integration with ReActAgent |
| agentscope-distribution POMs | Added haystack module to BOM and all-in-one distribution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...s-rag-haystack/src/main/java/io/agentscope/core/rag/integration/haystack/HayStackClient.java
Outdated
Show resolved
Hide resolved
...s-rag-haystack/src/main/java/io/agentscope/core/rag/integration/haystack/HayStackClient.java
Outdated
Show resolved
Hide resolved
...s-rag-haystack/src/main/java/io/agentscope/core/rag/integration/haystack/HayStackClient.java
Show resolved
Hide resolved
...s-rag-haystack/src/main/java/io/agentscope/core/rag/integration/haystack/HayStackConfig.java
Outdated
Show resolved
Hide resolved
...rc/main/java/io/agentscope/core/rag/integration/haystack/exception/HayStackApiException.java
Outdated
Show resolved
Hide resolved
...aystack/src/main/java/io/agentscope/core/rag/integration/haystack/model/SparseEmbedding.java
Outdated
Show resolved
Hide resolved
...ag-haystack/src/main/java/io/agentscope/core/rag/integration/haystack/HayStackKnowledge.java
Outdated
Show resolved
Hide resolved
...ag-haystack/src/main/java/io/agentscope/core/rag/integration/haystack/HayStackKnowledge.java
Outdated
Show resolved
Hide resolved
6b7358d to
0b334bb
Compare
AgentScope-Java Version
1.0.4-SNAPSHOT
Description
Checklist
Please check the following items before code is ready to be reviewed.
mvn spotless:applymvn test)