Cline - 中文版 Docs
  • Cline Documentation
  • 入门指南
    • 快速开始
    • What is Cline?
  • Basics
    • Cline - 中文版胜算 说明文档
      • Cline 和模型上下文协议 (MCP) 服务器:提升 AI 能力
      • Interactive blocks
        • OpenAPI
      • Integrations
        • Cloud Provider Integration
        • Security Concerns
      • .clineignore 功能支持
  • Cline - 中文版胜算 说明文档
    • 什么是Cline - 胜算云增强版
    • 对于新程序员
    • 安装 Cline-胜算云增强版
    • 安装 Dev Essentials
    • 我们最喜欢的技术栈
    • 上下文管理
    • 型号选择指南
  • Getting Started
    • What is Cline?
    • For New Coders
    • Installing Cline
    • Installing Dev Essentials
    • Our Favorite Tech Stack
    • Context Management
    • Model Selection Guide
  • 提高提示技巧
    • 提示工程指南
    • Cline-胜算云增强版 内存库
  • Improving Your Prompting Skills
    • Prompt Engineering Guide
    • Cline Memory Bank
  • 探索 Cline 的工具
    • Cline-胜算云增强版 工具指南
  • 检查站
  • 计划与行动模式:有效人工智能发展指南
  • 新建任务工具
  • Remote Browser 支持
  • Exploring Cline's Tools
    • Cline Tools Guide
    • Checkpoints
    • Plan & Act Modes: A Guide to Effective AI Development
    • New Task Tool
  • Remote Browser Support
  • 企业解决方案
    • 安全问题
  • 云提供商集成
  • MCP 服务器
  • 自定义说明
  • Security Concerns
    • Security Concerns
  • Cloud Provider Integration
  • MCP Servers
  • Custom Instructions
  • MCP服务器
    • MCP概述
    • MCP市场
  • 从 GitHub 添加 MCP 服务器
  • 配置 MCP 服务器
  • 连接到远程服务器
  • MCP 传输机制
  • MCP 服务器开发协议
  • MCP Servers
    • MCP Overview
  • MCP Marketplace
  • Adding MCP Servers from GitHub
  • Configuring MCP Servers
  • Connecting to a Remote Server
  • MCP Transport Mechanisms
  • MCP Server Development Protocol
  • 自定义模型配置
    • 带有凭证身份验证的 AWS Bedrock
    • 带配置文件身份验证的 AWS Bedrock
    • GCP Vertex AI
  • LiteLLM 和 Cline-胜算云增强版(使用 Codestral)
  • Custom Model Configs
    • AWS Bedrock w/ Credentials Authentication
  • AWS Bedrock w/ Profile Authentication
  • GCP Vertex AI
  • LiteLLM & Cline (using Codestral)
  • 本地运行模型
    • 请先阅读
    • Ollama
    • LM 工作室
  • Ollama
  • LM Studio
  • Running Models Locally
  • More Info
    • Telemetry
    • 遥测
Powered by GitBook
On this page

LiteLLM 和 Cline-胜算云增强版(使用 Codestral)

PreviousGCP Vertex AINextAWS Bedrock w/ Credentials Authentication

Last updated 1 day ago

将 LiteLLM 与 Cline-胜算云增强版 结合使用

本指南演示了如何从 Codestral 模型开始运行 LiteLLM 的演示以便与 Cline-胜算云增强版 一起使用。

先决条件

  • 安装以在本地运行 LiteLLM 映像

  • 对于此示例配置:Codestral API 密钥(不同于 Mistral API 密钥)

设置

  1. 创建 .env 文件并填写相应字段

复制

# Tip: Use the following command to generate a random alphanumeric key:
# openssl rand -base64 32 | tr -dc 'A-Za-z0-9' | head -c 32
LITELLM_MASTER_KEY=YOUR_LITELLM_MASTER_KEY
CODESTRAL_API_KEY=YOUR_CODESTRAL_API_KEY

注意:虽然这仅限于本地主机,但将 LITELLM_MASTER_KEY 设置为安全密钥是一种很好的做法

  1. 配置

我们需要创建一个 config.yaml 文件来包含我们的 LiteLLM 配置。在本例中,我们只有一个模型,即“codestral-latest”,并将其标记为“codestral”。

复制

model_list:
  - model_name: codestral
    litellm_params:
      model: codestral/codestral-latest
      api_key: os.environ/CODESTRAL_API_KEY

运行演示

  1. 启动 LiteLLM docker 容器

复制

解释docker run \
    --env-file .env \
    -v $(pwd)/config.yaml:/app/config.yaml \
    -p 127.0.0.1:4000:4000 \
    ghcr.io/berriai/litellm:main-latest \
    --config /app/config.yaml --detailed_debug
  1. 设置 Cline-胜算云增强版

    一旦 LiteLLM 服务器启动并运行,您就可以在 Cline 中进行设置:

    • 基本 URL 应为 http://0.0.0.0:4000/v1

    • API 密钥应该是您在 .env 中为 LITELLM_MASTER_KEY 设置的密钥

    • 模型 ID 是 codestral 或您在 config.yaml 下命名的任何名称

获取帮助

Docker CLI 或 Docker Desktop
LiteLLM 文档
Mistral AI 控制台
Cline Discord 社区