RAG_with_OpenLIT
1.0.0
此儲存庫使用 OpenLIT 可觀測性工具在 RAG 系統上實作 Ragas Metrics。
為了運行這個儲存庫:
$ git clone https : // github . com / paulomuraroferreira / Self_correcting_coding_agent . git
$ cd Self_correcting_coding_agent
$ pip install - e .
建立.env檔案並填寫以下環境變數:
OPENAI_API_KEY = your_openai_api_key
OTEL_EXPORTER_OTLP_ENDPOINT = http : // 127.0 . 0.1 : 4318
運行應用程式:
4.1.執行分塊過程
將pdfs檔案放入app/data/pdfs
資料夾中
跑步
$ python app / chunking . py
4.2.運行fastapi
$ cd app
$ uvicorn app:app --reload
4.3 運行 OpenLit
$ git clone [email protected]:openlit/openlit.git
$ cd openlit
$ docker compose up -d
4.4 使用下列憑證進入 OpenLit 儀表板:
Email: [email protected]
Password: openlituser
4.5.在檔案 request.http 上發送請求
例子:
### POST Request to FastAPI
POST http://127.0.0.1:8000/query
Accept: application/json
Content-Type: application/json
{
"question": "What is QLora?"
}
4.6 檢查 OpenLit 儀表板上的指標: