Skip to content

调用阿里通义大模型实现的问答服务器

Notifications You must be signed in to change notification settings

CambridgeZ/AliLLMServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

调用阿里 通义千问 接口的问答机器人

架构

.
├── CMakeLists.txt
├── include
│   ├── Acceptor.hpp
│   ├── EventLoop.hpp
│   ├── InetAddress.hpp
│   ├── LLMApi.hpp
│   ├── Socket.hpp
│   ├── SocketIO.hpp
│   └── TcpConnection.hpp
├── main.cpp
├── python_script
│   ├── getReply.py
│   ├── hello_qwen.py
│   ├── __pycache__
│   │   └── getReply.cpython-311.pyc
│   └── showPackage.py
├── README.md
├── source
│   ├── Acceptor.cpp
│   ├── EventLoop.cpp
│   ├── InetAddress.cpp
│   ├── Socket.cpp
│   ├── SocketIO.cpp
│   └── TcpConnection.cpp
└── tests
    ├── testLLMApi
    └── testLLMApi.cpp

部署

部署相关的python环境

python3.11 + Linux

pip3 install openai
pip3 install openai --upgrade
pip3 install pybind11

修改相关参数

将 /python_script/getReply line 10中的 api_key="" 当中填入相关的api_key ./CMakeLists.txt 相关包的位置改为本机上相关包的路径

构建

cmake -B build
cmake --build build

客户端使用方式

nc ip port
进行提问

About

调用阿里通义大模型实现的问答服务器

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published