luthor
1.0.0
Luthor是為律師事務所設計的檢索型發電(RAG)系統,使律師能夠有效地“與他們的數據進行交談”。該系統允許法律專業人員將文檔(例如,備忘錄)上傳到存儲在Pinecone中的矢量數據庫中,並隨後使用使用Smarlit構建的類似聊天機器人的接口查詢此信息。
src/data_loader.py ):處理讀取各種文件格式。src/preprocessor.py ):準備用於嵌入和存儲的文本。app.py ):簡化文檔上傳和查詢的接口。Luthor使用容器化體系結構部署在AWS上:
克隆存儲庫:
git clone https://github.com/boemer00/luthor.git
cd luthor
構建Docker圖像:
docker build -t luthor .
將圖像推向亞馬遜ECR:
aws ecr get-login-password --region [your-region] | docker login --username AWS --password-stdin [your-account-id].dkr.ecr.[your-region].amazonaws.com
docker tag luthor:latest [your-account-id].dkr.ecr.[your-region].amazonaws.com/luthor:latest
docker push [your-account-id].dkr.ecr.[your-region].amazonaws.com/luthor:latest
設置AWS Secrets Manager:為OpenAI_API_KEY,PINECONE_API_KEY和PINECONE_ENVIRONMENT創建秘密。
部署ECS任務定義:
aws ecs register-task-definition --cli-input-json file://infrastructure/ecs-task-definition.json
創建ECS服務:
aws ecs create-service --cluster [your-cluster-name] --service-name luthor-service --task-definition luthor-app --desired-count 1 --launch-type FARGATE --network-configuration "awsvpcConfiguration={subnets=[subnet-xxxxxxxx,subnet-yyyyyyyy],securityGroups=[sg-xxxxxxxxxxxxxxxx]}" --load-balancers "targetGroupArn=arn:aws:elasticloadbalancing:[region]:[account-id]:targetgroup/[target-group-name]/[target-group-id],containerName=luthor-app,containerPort=8501"
通過應用程序負載平衡器的DNS名稱訪問Luthor應用程序。
文檔上傳:
查詢:
版權所有。
該代碼和所有相關文件是Renato Boemer的獨家屬性。未經Renato Boemer事先書面許可,可以以任何形式或任何方式以任何形式或任何方式以任何形式或任何方式複制,修改,改編,存儲在檢索系統中或傳輸。