Info
This is a Flask server providing a RAG (Retrieval Augmented Generation) vector store backend. It manages multiple vectorstores, supports semantic search queries, and offers a web interface for testing and inspection.
Features: Semantic similarity search, chunk viewing, store statistics, query testing, and PDF data inspection.
Available Stores
- Helmholtz_News : Statistics | Chunk View | Test Query
API
Description
This module supplies a Python interface to the vector store API. It wraps each API call in a respective Python function.
Usage
from store_api.vectorstore_api.cli_cls import VsAPICli
# create instance of the API
api = VsAPICli(address='url_to_api')
# ping the server
ping_result : str = api.ping()
# fetch available stores
stores : list[str] = api.fetch_available_stores()
# query a specific store
query = 'query_string'
store_name = 'store_name'
num_chunks = 5 # optional, number of chunks to return
answer : list[dict] = api.query(
message=query,
store=store_name,
score=True,
num_of_chunks=num_chunks
)
# Answer structure: List of dictionaries with format:
# {"page_content": ,
# "metadata": {:, ..., "score":}}