Spaces:
Sleeping
Sleeping
vtrv.vls
commited on
Commit
·
6f8a3e7
1
Parent(s):
7f3196a
New API
Browse files
utils.py
CHANGED
@@ -9,7 +9,7 @@ def gen_auth_token(auth_file):
|
|
9 |
# url = "https://ngw.devices.sberbank.ru:9443/api/v2/oauth"
|
10 |
url = "https://api.mlrnd.ru/api/v2/oauth"
|
11 |
|
12 |
-
payload='scope=GIGACHAT_API_CORP'
|
13 |
payload='scope=API_v1'
|
14 |
headers = {
|
15 |
'Content-Type': 'application/x-www-form-urlencoded',
|
@@ -29,7 +29,7 @@ def get_text(content='Привет!', auth_token=None):
|
|
29 |
url = "https://api.mlrnd.ru/api/v1/chat/completions"
|
30 |
|
31 |
payload = json.dumps({
|
32 |
-
"model": "
|
33 |
"messages": [
|
34 |
{
|
35 |
"role": "user",
|
|
|
9 |
# url = "https://ngw.devices.sberbank.ru:9443/api/v2/oauth"
|
10 |
url = "https://api.mlrnd.ru/api/v2/oauth"
|
11 |
|
12 |
+
# payload='scope=GIGACHAT_API_CORP'
|
13 |
payload='scope=API_v1'
|
14 |
headers = {
|
15 |
'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
29 |
url = "https://api.mlrnd.ru/api/v1/chat/completions"
|
30 |
|
31 |
payload = json.dumps({
|
32 |
+
"model": "Test_model",
|
33 |
"messages": [
|
34 |
{
|
35 |
"role": "user",
|