跳到主要内容
🦾 OpenLLM 允许开发者通过一条命令将任何开源 LLM 作为 OpenAI 兼容的 API 端点运行。
  • 🔬 专为快速和生产用例而构建
  • 🚂 支持 llama3、qwen2、gemma 等,以及许多量化版本 完整列表
  • ⛓️ OpenAI 兼容 API
  • 💬 内置类似 ChatGPT 的 UI
  • 🔥 通过最先进的推理后端加速 LLM 解码
  • 🌥️ 为企业级云部署(Kubernetes、Docker 和 BentoCloud)做好准备

安装

通过 PyPI 安装 openllm
pip install -qU  openllm

在本地启动 OpenLLM 服务器

要启动 LLM 服务器,请使用 openllm hello 命令
openllm hello

包装器

from langchain_community.llms import OpenLLM

server_url = "https://:3000"  # Replace with remote host if you are running on a remote server
llm = OpenLLM(base_url=server_url, api_key="na")
llm("To build a LLM from scratch, the following are the steps:")

以编程方式连接这些文档到 Claude、VSCode 等,通过 MCP 获取实时答案。
© . This site is unofficial and not affiliated with LangChain, Inc.