yeref 0.24.21__py3-none-any.whl → 0.24.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
yeref/yeref.py
CHANGED
@@ -6238,17 +6238,26 @@ async def outsource_generate(lst, path='link_path'):
|
|
6238
6238
|
return
|
6239
6239
|
elif provider_name == 'proxyapi':
|
6240
6240
|
base_url = "https://api.proxyapi.ru/openai/v1"
|
6241
|
-
client = AsyncOpenAI(api_key=
|
6241
|
+
client = AsyncOpenAI(api_key=api_key,
|
6242
6242
|
base_url=base_url)
|
6243
6243
|
|
6244
|
+
# res = await client.images.generate(prompt=item['prompt'],
|
6245
|
+
# model=f"dall-e-2", # dall-e-3 11,52 rub 1024x1024
|
6246
|
+
# n=1, # max 1 for dalle-3
|
6247
|
+
# quality="standard",
|
6248
|
+
# response_format='url',
|
6249
|
+
# # size="1024x1024",
|
6250
|
+
# # size="512x512",
|
6251
|
+
# size="256x256",
|
6252
|
+
# )
|
6244
6253
|
res = await client.images.generate(prompt=item['prompt'],
|
6245
|
-
model=f"
|
6254
|
+
model=f"gpt-image-1",
|
6246
6255
|
n=1, # max 1 for dalle-3
|
6247
|
-
quality="
|
6256
|
+
quality="low", # low 3 rub, medium 12 rub
|
6248
6257
|
response_format='url',
|
6249
|
-
|
6258
|
+
size="1024x1024",
|
6250
6259
|
# size="512x512",
|
6251
|
-
size="256x256",
|
6260
|
+
# size="256x256",
|
6252
6261
|
)
|
6253
6262
|
for it in res.data:
|
6254
6263
|
result.append({'type': item['type'], 'answer': it.url})
|
@@ -6294,7 +6303,8 @@ async def outsource_generate(lst, path='link_path'):
|
|
6294
6303
|
client = AsyncOpenAI(api_key=api_key, base_url=base_url)
|
6295
6304
|
|
6296
6305
|
response = await client.audio.speech.create(
|
6297
|
-
model="tts-1",
|
6306
|
+
# model="tts-1", # gpt-4o-mini-tts - new better and cheaper (34 < 43)
|
6307
|
+
model="gpt-4o-mini-tts", # gpt-4o-mini-tts - new better and cheaper (34 < 43)
|
6298
6308
|
input=input_,
|
6299
6309
|
voice=random.choice(['alloy', 'shimmer'])
|
6300
6310
|
)
|
@@ -6444,7 +6454,11 @@ async def outsource_generate(lst, path='link_path'):
|
|
6444
6454
|
base_url = "https://api.proxyapi.ru/openai/v1"
|
6445
6455
|
client = AsyncOpenAI(api_key=api_key, base_url=base_url)
|
6446
6456
|
|
6447
|
-
res = await client.audio.transcriptions.create(model="whisper-1",
|
6457
|
+
# res = await client.audio.transcriptions.create(model="whisper-1",
|
6458
|
+
# file=open(src_mp3, "rb"))
|
6459
|
+
|
6460
|
+
# gpt-4o-transcribe 1,72 rub, gpt-4o-mini-transcribe 0,86 rub
|
6461
|
+
res = await client.audio.transcriptions.create(model="gpt-4o-transcribe",
|
6448
6462
|
file=open(src_mp3, "rb"))
|
6449
6463
|
|
6450
6464
|
result.append({'type': item['type'], 'answer': res.text})
|
@@ -10142,7 +10156,7 @@ async def convert_png_to_mp4(ENT_TID, input_name, output_name, MEDIA_D):
|
|
10142
10156
|
|
10143
10157
|
|
10144
10158
|
async def item_to_static_sticker(bot, chat_id, input_file, PACK_TYPE, PACK_KIND, is_upload=True, is_circle=False,
|
10145
|
-
is_rbg=False):
|
10159
|
+
is_rbg=False, is_del=False):
|
10146
10160
|
result = result_upl = None
|
10147
10161
|
file_jpg = input_file[:input_file.rfind('.')] + '_.jpg'
|
10148
10162
|
file_png = input_file[:input_file.rfind('.')] + '_.png'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
|
2
|
+
yeref/l_.py,sha256=SJDlfQnj-3teoe25QRpuSgERHOsDcc_MvFiqxskvonU,1179178
|
3
|
+
yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
|
4
|
+
yeref/yeref.py,sha256=gkaXMy4RLjpFyXRIp9tDmcSZKmN57Kuwnfpvkc8VsAA,1013770
|
5
|
+
yeref-0.24.22.dist-info/METADATA,sha256=rDrJHLIhZjGR9UXfFvG4X7Pa6CV60xSJOUOFd91DedI,119
|
6
|
+
yeref-0.24.22.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
yeref-0.24.22.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
|
8
|
+
yeref-0.24.22.dist-info/RECORD,,
|
yeref-0.24.21.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
|
2
|
-
yeref/l_.py,sha256=SJDlfQnj-3teoe25QRpuSgERHOsDcc_MvFiqxskvonU,1179178
|
3
|
-
yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
|
4
|
-
yeref/yeref.py,sha256=lGz5JnbWdpNbFhuzlQh8CFqBbXHYAeR68NDAHWiG1nY,1012340
|
5
|
-
yeref-0.24.21.dist-info/METADATA,sha256=kzvO--BJuyaoITHXhhtDmQFobgd-8WUyQkIwMoAD0U0,119
|
6
|
-
yeref-0.24.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
-
yeref-0.24.21.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
|
8
|
-
yeref-0.24.21.dist-info/RECORD,,
|
File without changes
|
File without changes
|