Spaces:
Running
Running
Update API Providers
Browse files- client/html/index.html +1 -1
- g4f/Provider/Providers/Lsdev.py +0 -54
- g4f/Provider/__init__.py +0 -1
- g4f/models.py +1 -1
client/html/index.html
CHANGED
@@ -75,7 +75,7 @@
|
|
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 (
|
79 |
</select>
|
80 |
</div>
|
81 |
<div class="field">
|
|
|
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" disabled>GPT-4 (offline)</option>
|
79 |
</select>
|
80 |
</div>
|
81 |
<div class="field">
|
g4f/Provider/Providers/Lsdev.py
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
import os, uuid, requests
|
2 |
-
from ...typing import sha256, Dict, get_type_hints
|
3 |
-
|
4 |
-
url = 'https://gpt.free.lsdev.me'
|
5 |
-
model = ['gpt-4-0613', 'gpt-4-poe']
|
6 |
-
supports_stream = True
|
7 |
-
needs_auth = True
|
8 |
-
|
9 |
-
models = {
|
10 |
-
'gpt-4-0613': {
|
11 |
-
"id":"gpt-4-0613",
|
12 |
-
"name":"GPT-4-0613",
|
13 |
-
"maxLength":24000,
|
14 |
-
"tokenLimit":8192
|
15 |
-
},
|
16 |
-
'claude-instant-100k': {
|
17 |
-
"id":"claude-instant-100k",
|
18 |
-
"name":"CLAUDE-INSTANT-100K"
|
19 |
-
},
|
20 |
-
'gpt-4-poe': {
|
21 |
-
"id":"gpt-4-poe",
|
22 |
-
"name":"GPT-4-POE"
|
23 |
-
},
|
24 |
-
}
|
25 |
-
|
26 |
-
def _create_completion(model: str, messages: list, stream: bool, chatId: str, **kwargs):
|
27 |
-
|
28 |
-
print(kwargs)
|
29 |
-
|
30 |
-
headers = {
|
31 |
-
'authority': 'gpt.free.lsdev.me',
|
32 |
-
'content-type': 'application/json',
|
33 |
-
'origin': 'https://gpt.free.lsdev.me',
|
34 |
-
'referer': 'https://gpt.free.lsdev.me/zh',
|
35 |
-
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36',
|
36 |
-
}
|
37 |
-
|
38 |
-
json_data = {
|
39 |
-
'conversationId': chatId,
|
40 |
-
'model': models[model],
|
41 |
-
'messages': messages,
|
42 |
-
'auth': 'oVy1CLB25mA43',
|
43 |
-
'key': '',
|
44 |
-
'prompt': "You are ChatGPT, a large language model trained by OpenAI. Follow the user's instructions carefully. Respond using markdown.",
|
45 |
-
}
|
46 |
-
|
47 |
-
response = requests.post('https://gpt.free.lsdev.me/api/chat',
|
48 |
-
headers=headers, json=json_data, stream=stream)
|
49 |
-
|
50 |
-
for token in response.iter_content(chunk_size=2046):
|
51 |
-
yield (token.decode('utf-8'))
|
52 |
-
|
53 |
-
params = f'g4f.Providers.{os.path.basename(__file__)[:-3]} supports: ' + \
|
54 |
-
'(%s)' % ', '.join([f"{name}: {get_type_hints(_create_completion)[name].__name__}" for name in _create_completion.__code__.co_varnames[:_create_completion.__code__.co_argcount]])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
g4f/Provider/__init__.py
CHANGED
@@ -16,7 +16,6 @@ from .Providers import (
|
|
16 |
Gravityengine,
|
17 |
H2o,
|
18 |
hteyun,
|
19 |
-
Lsdev,
|
20 |
Liaobots,
|
21 |
Lockchat,
|
22 |
Mishalsgpt,
|
|
|
16 |
Gravityengine,
|
17 |
H2o,
|
18 |
hteyun,
|
|
|
19 |
Liaobots,
|
20 |
Lockchat,
|
21 |
Mishalsgpt,
|
g4f/models.py
CHANGED
@@ -41,7 +41,7 @@ class Model:
|
|
41 |
class gpt_4_0613:
|
42 |
name: str = 'gpt-4-0613'
|
43 |
base_provider: str = 'openai'
|
44 |
-
best_provider: Provider.Provider = Provider.
|
45 |
best_providers: list = [Provider.Bing, Provider.Lockchat]
|
46 |
|
47 |
class claude_instant_v1_100k:
|
|
|
41 |
class gpt_4_0613:
|
42 |
name: str = 'gpt-4-0613'
|
43 |
base_provider: str = 'openai'
|
44 |
+
best_provider: Provider.Provider = Provider.Lockchat
|
45 |
best_providers: list = [Provider.Bing, Provider.Lockchat]
|
46 |
|
47 |
class claude_instant_v1_100k:
|