Skip to main content

AI Proxy

企業在導入 LLM 時,可能會用到多種不同的模型,這些包含商用授權與開源授權以及來自不同的服務商。為了統一管理及開發應用這些各類不同模型,建議使用 AI Proxy (AI API Gateway) 這類平台來解決,以達到下列目的:

  • 統一 API 介接入口與格式
  • 成本追蹤
  • 平衡負載

LiteLLM

CLI Proxy API

Installation
mkdir cpa-plus
cd cpa-plus

curl -o config.yaml https://raw.githubusercontent.com/router-for-me/CLIProxyAPIPlus/main/config.example.yaml

mv config.example.yaml config.yaml

Edit: config.yaml 

remote-management:
  allow-remote: true
  secret-key: YOUR-MANAGEMENT-KEY

Edit: docker-compose.yaml 

services:
  cli-proxy-api:
    image: eceasy/cli-proxy-api-plus:latest 
    container_name: cli-proxy-api-plus 
    ports:
      - "8317:8317" 
    volumes:
      - ./config.yaml:/CLIProxyAPI/config.yaml
      - ./auths:/root/.cli-proxy-api 
      - ./logs:/CLIProxyAPI/logs
    environment:
      - TZ=Asia/Taipei
    restart: always

 

 

Sub2API