fxcl / rag-search

RAG Search API

Home Page:https://thinkany.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
}

About

RAG Search API

https://thinkany.ai

License:Apache License 2.0


Languages

Language:Python 99.7%Language:Makefile 0.3%