feat: Part 4 - Introduce Main RAG Service API and its tests #629
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reason for Change:
This series of PR will integrate llamaindex RAG service for Kaito.
This PR introduces the main API and its endpoints.
main.py
introduces the main APIFour endpoints are introduced:
/index
- This creates a new index of the specified name/query
- This queries the index for context and runs it through an LLM/document/{index_name}/{doc_id}
- This retrieves a document from the specified index (this confirms if a document exists and gets its hash and metadata but does not include the documents text itself)/indexed-documents
- This retrieves all documents from the specified index (including text)config.py
introduces the configurable params passed via environment variables from the ragengine controllermodels.py
specifies the schema required for valid HTTP requests to the endpoints specified in main.py