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事先书面许可,可以以任何形式或任何方式以任何形式或任何方式以任何形式或任何方式复制,修改,改编,存储在检索系统中或传输。