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 仪表板上的指标: