Skip to content

RAG相关内容:fastapi本地模型部署、langchain和llamaindex适配

Notifications You must be signed in to change notification settings

happy-xlf/RAG_work

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Langchain RAG

适配langchain的本地LLM

1. 安装

pip install langchain
pip install langchain-openai

2. 本地服务FastAPI搭建

  • 正常hunggingface启动
python llm_fastapi.py
  • vLLM加速启动
python vllm_fastapi.py

3. 客户端启动

python client.py

4. 测试

curl https://localhost:7000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Qwen2-4b-chat",
    "messages": [{"role": "user", "content": "你好,你是谁?"}]
  }'

About

RAG相关内容:fastapi本地模型部署、langchain和llamaindex适配

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages