LMDeploy api_server 支持把模型一键封装为服务,对外提供的 RESTful API 兼容 openai 的接口。以下为服务启动的示例:
lmdeploy serve api_server internlm/internlm2_5-7b-chat服务默认端口是23333。在 server 启动后,你可以在终端通过api_client与server进行对话,体验对话效果:
lmdeploy serve api_client http://0.0.0.0:23333此外,你还可以通过 Swagger UI http://0.0.0.0:23333 在线阅读和试用 api_server 的各接口,也可直接查阅文档,了解各接口的定义和使用方法。