monra commited on
Commit
95ed877
1 Parent(s): e26bc57

Add random choice of API provider

Browse files
Files changed (2) hide show
  1. client/html/index.html +2 -2
  2. g4f/models.py +5 -7
client/html/index.html CHANGED
@@ -74,8 +74,8 @@
74
  <option value="gpt-3.5-turbo">GPT-3.5</option>
75
  <option value="gpt-3.5-turbo-0613">GPT-3.5-0613</option>
76
  <option value="gpt-3.5-turbo-16k">GPT-3.5-turbo-16k</option>
77
- <option value="gpt-3.5-turbo-16k-0613">GPT-3.5-turbo-16k-0613</option>
78
- <option value="gpt-4-0613" selected>GPT-4</option>
79
  </select>
80
  </div>
81
  <div class="field">
 
74
  <option value="gpt-3.5-turbo">GPT-3.5</option>
75
  <option value="gpt-3.5-turbo-0613">GPT-3.5-0613</option>
76
  <option value="gpt-3.5-turbo-16k">GPT-3.5-turbo-16k</option>
77
+ <option value="gpt-3.5-turbo-16k-0613" selected>GPT-3.5-turbo-16k-0613</option>
78
+ <option value="gpt-4-0613">GPT-4 (unstable)</option>
79
  </select>
80
  </div>
81
  <div class="field">
g4f/models.py CHANGED
@@ -1,5 +1,5 @@
1
  from g4f import Provider
2
-
3
 
4
  class Model:
5
  class model:
@@ -10,24 +10,22 @@ class Model:
10
  class gpt_35_turbo:
11
  name: str = 'gpt-3.5-turbo'
12
  base_provider: str = 'openai'
13
- best_provider: Provider.Provider = Provider.Better
14
- best_providers: list = [Provider.Better, Provider.Lockchat, Provider.Yqcloud, Provider.Forefront,]
15
 
16
  class gpt_35_turbo_0613:
17
  name: str = 'gpt-3.5-turbo-0613'
18
  base_provider: str = 'openai'
19
- best_provider: Provider.Provider = Provider.Better
20
 
21
  class gpt_35_turbo_16k_0613:
22
  name: str = 'gpt-3.5-turbo-16k-0613'
23
  base_provider: str = 'openai'
24
- best_provider: Provider.Provider = Provider.Gravityengine
25
- best_providers: list = [Provider.Easychat, Provider.Ezcht, Provider.Better]
26
 
27
  class gpt_35_turbo_16k:
28
  name: str = 'gpt-3.5-turbo-16k'
29
  base_provider: str = 'openai'
30
- best_provider: Provider.Provider = Provider.Better
31
 
32
  class gpt_4_dev:
33
  name: str = 'gpt-4-for-dev'
 
1
  from g4f import Provider
2
+ import random
3
 
4
  class Model:
5
  class model:
 
10
  class gpt_35_turbo:
11
  name: str = 'gpt-3.5-turbo'
12
  base_provider: str = 'openai'
13
+ best_provider: Provider.Provider = random.choice([Provider.DeepAi, Provider.Easychat, Provider.Xiaor])
 
14
 
15
  class gpt_35_turbo_0613:
16
  name: str = 'gpt-3.5-turbo-0613'
17
  base_provider: str = 'openai'
18
+ best_provider: Provider.Provider = random.choice([Provider.Easychat, Provider.Xiaor])
19
 
20
  class gpt_35_turbo_16k_0613:
21
  name: str = 'gpt-3.5-turbo-16k-0613'
22
  base_provider: str = 'openai'
23
+ best_provider: Provider.Provider = random.choice([Provider.Easychat, Provider.Xiaor])
 
24
 
25
  class gpt_35_turbo_16k:
26
  name: str = 'gpt-3.5-turbo-16k'
27
  base_provider: str = 'openai'
28
+ best_provider: Provider.Provider = random.choice([Provider.Easychat, Provider.Xiaor])
29
 
30
  class gpt_4_dev:
31
  name: str = 'gpt-4-for-dev'