yeref 0.24.21__tar.gz → 0.24.22__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.24.21
3
+ Version: 0.24.22
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name='yeref',
5
- version='0.24.21',
5
+ version='0.24.22',
6
6
  description='desc-f',
7
7
  author='john smith',
8
8
  packages=['yeref'],
@@ -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="sk-dR9xp1ei1uciIMd2ZPb3tdY8piZ4ICnn",
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"dall-e-2",
6254
+ model=f"gpt-image-1",
6246
6255
  n=1, # max 1 for dalle-3
6247
- quality="standard",
6256
+ quality="low", # low 3 rub, medium 12 rub
6248
6257
  response_format='url',
6249
- # size="1024x1024",
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'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.24.21
3
+ Version: 0.24.22
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
File without changes
File without changes
File without changes
File without changes
File without changes