Skip to content

airbai/rag-search

 
 

Repository files navigation

rag-search

RAG Search API by thinkany.ai

apitest

quick start

  1. put .env file under root dir, set values like below:
SERPER_API_KEY=

OPENAI_BASE_URL=
OPENAI_API_KEY=
OPENAI_MODEL=gpt-3.5-turbo
OPENAI_EMBED_MODEL=text-embedding-ada-002

ZILLIZ_URI=
ZILLIZ_TOKEN=
ZILLIZ_DIM=1536
ZILLIZ_COLLECTION=

AUTH_API_KEY=
  1. install dependencies
pip install -r requirements.txt
  1. start FastAPI server
uvicorn main:app --reload --port 8069
  1. make api request
@baseUri=http://127.0.0.1:8069
@apiKey=xxx

### ping
GET {{baseUri}}/

### rag search
POST {{baseUri}}/rag-search
Content-Type: application/json
Authorization: Bearer {{apiKey}}

{
    "query": "ThinkAny.AI",
    "search_n": 10,
    "search_provider": "google",
    "is_reranking": true,
    "is_detail": true,
    "detail_min_score": 0.7,
    "detail_top_k": 3,
    "is_filter": true,
    "filter_min_score": 0.8,
    "filter_top_k": 6
}

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Makefile 0.2%