Skip to content

Latest commit

 

History

History
75 lines (65 loc) · 2.19 KB

32.md

File metadata and controls

75 lines (65 loc) · 2.19 KB

gemini2.0 测试及本地使用、云端cline开发教程 cline+liteLLM+api 还有还强大好用的用法:你的ai代码编辑器+移动的vs code

交流群:

企微 https://qr61.cn/oohivs/qRp62U6

Discord https://discord.gg/3JWMgKQznF

视频

liteLLM安装及运行

  • 安装命令
pip install litellm
pip install -r requirements.txt
  • requirements.txt
python-dotenv==1.0.0 # for env
tiktoken==0.7.0 # for calculating usage
importlib-metadata==6.8.0 # for random utils
tokenizers==0.14.0 # for calculating usage
click==8.1.7 # for proxy cli
jinja2==3.1.4 # for prompt templates
certifi==2024.7.4 # [TODO] clean up
aiohttp==3.10.2 # for network calls
tenacity==8.2.3 # for retrying requests, when litellm.num_retries set
pydantic==2.7.1 # proxy + openai req.
jsonschema==4.22.0 # validating json schema
websockets==10.4 # for realtime API
fastapi==0.111.0 # server dep
backoff==2.2.1 # server dep
orjson==3.9.15 # fast /embedding responses
Pillow==10.3.0
gunicorn
pyyaml
apscheduler
cryptography
opentelemetry-api==1.25.0
opentelemetry-sdk==1.25.0
opentelemetry-exporter-otlp==1.25.0
  • 配置文件 config.yaml
model_list:
  - model_name: gemini-pro
    litellm_params:
      model: gemini/gemini-1.5-pro
      api_key: AIzaSyBMyt3uledq4ZgsswbmEiZdmfR6jtZAJao
  - model_name: gemini-2.0-flash
    litellm_params:
      model: gemini/gemini-2.0-flash-exp
      api_key: AIzaSyBMyt3uledq4ZgsswbmEiZdmfR6jtZAJao
      
litellm_settings:
  drop_params: True
  • 运行命令(根据config.yaml实际路径修改以下命令)
litellm run --config /path/to/config.yaml

相关链接