keungliang commited on
Commit
fa497b5
·
verified ·
1 Parent(s): e3438df

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +10 -0
  2. config.yaml +33 -0
Dockerfile ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from ghcr.io/berriai/litellm:main-latest
2
+
3
+ ENV TZ=Asia/Taipei
4
+ ENV OPENAI_API_KEY=any
5
+
6
+ COPY ./config.yaml /app/config.yaml
7
+ EXPOSE 7860
8
+
9
+ ENTRYPOINT ["litellm"]
10
+ CMD [ "--config", "/app/config.yaml", "--port", "7860", "--num_workers", "8" ]
config.yaml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model_list:
2
+ - model_name: azure/o3-pro
3
+ litellm_params:
4
+ model: azure-o3-pro
5
+ api_key: os.environ/AZURE_RESPONSES_OPENAI_API_KEY
6
+ api_base: os.environ/AZURE_RESPONSES_OPENAI_BASE_URL
7
+ api_version: "preview"
8
+ model_info:
9
+ mode: responses # 指定使用 responses 模式
10
+
11
+
12
+ # --------------Other Settings--------------------
13
+
14
+ litellm_settings:
15
+ # Networking settings
16
+ request_timeout: 20 # (int) llm request timeout in seconds. Raise Timeout error if call takes longer than 10s. Sets litellm.request_timeout
17
+ num_retries: 3
18
+ # fallbacks: [{ "gemini-1.5-pro": ["gemini-1.5-flash"] }]
19
+ allowed_fails: 3 # cooldown model if it fails > 1 call in a minute.
20
+ cooldown_time: 30 # how long to cooldown model if fails/min > allowed_fails
21
+ drop_params: true
22
+
23
+ general_settings:
24
+ master_key: os.environ/MASTER_KEY # sk-1234 # [OPTIONAL] Only use this if you require all calls to contain this key (Authorization: Bearer sk-1234)
25
+
26
+ # router_settings:
27
+ # fallbacks:
28
+ # [
29
+ # { "or/gemini-2.0-flash-exp": ["gg1/gemini-2.0-flash-exp"] },
30
+ # { "gpt-3.5-turbo": ["gemini-1.5-flash"] },
31
+ # ]
32
+ # model_group_alias: { "gpt-4": "gemini-1.5-pro" }
33
+ # routing_strategy: simple-shuffle