MeUtils 2024.12.26.22.14.1__py3-none-any.whl → 2025.1.3.14.11.44__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.
Files changed (30) hide show
  1. {MeUtils-2024.12.26.22.14.1.dist-info → MeUtils-2025.1.3.14.11.44.dist-info}/METADATA +26 -26
  2. {MeUtils-2024.12.26.22.14.1.dist-info → MeUtils-2025.1.3.14.11.44.dist-info}/RECORD +30 -23
  3. examples/_openaisdk/openai_aiplus.py +54 -0
  4. examples/_openaisdk/openai_chatfire.py +4 -1
  5. examples/_openaisdk/openai_deepinfra.py +55 -0
  6. examples/_openaisdk/openai_gitee.py +33 -0
  7. examples/_openaisdk/openai_qwen.py +58 -0
  8. examples/_openaisdk/openai_zhipu.py +2 -0
  9. examples/_openaisdk/zhipu_/346/231/272/350/203/275/344/275/223.py +46 -0
  10. meutils/_utils.py +15 -1
  11. meutils/apis/images/recraft.py +2 -3
  12. meutils/apis/jimeng/images.py +24 -4
  13. meutils/apis/vidu/vidu_video.py +1 -1
  14. meutils/data/VERSION +1 -1
  15. meutils/data/oneapi/NOTICE.md +77 -38
  16. meutils/init/evn.py +1 -1
  17. meutils/llm/completions/rag/fire.py +42 -12
  18. meutils/llm/openai_utils/common.py +1 -1
  19. meutils/request_utils/ark.py +47 -0
  20. meutils/{jwt_utils → request_utils/jwt_utils}/common.py +1 -0
  21. meutils/request_utils/volc.py +160 -0
  22. meutils/schemas/image_types.py +2 -0
  23. meutils/schemas/kuaishou_types.py +23 -6
  24. meutils/schemas/oneapi/common.py +40 -14
  25. meutils/schemas/openai_types.py +17 -6
  26. {MeUtils-2024.12.26.22.14.1.dist-info → MeUtils-2025.1.3.14.11.44.dist-info}/LICENSE +0 -0
  27. {MeUtils-2024.12.26.22.14.1.dist-info → MeUtils-2025.1.3.14.11.44.dist-info}/WHEEL +0 -0
  28. {MeUtils-2024.12.26.22.14.1.dist-info → MeUtils-2025.1.3.14.11.44.dist-info}/entry_points.txt +0 -0
  29. {MeUtils-2024.12.26.22.14.1.dist-info → MeUtils-2025.1.3.14.11.44.dist-info}/top_level.txt +0 -0
  30. /meutils/{jwt_utils → request_utils/jwt_utils}/__init__.py +0 -0
@@ -153,6 +153,10 @@ MODEL_PRICE = {
153
153
 
154
154
  "api-kling": 0.1,
155
155
  "api-kling-vip": 0.5,
156
+ "api-kling-v1.6-std-5s": 1,
157
+ "api-kling-v1.6-std-10s": 2,
158
+ "api-kling-v1.6-pro-5s": 1.5,
159
+ "api-kling-v1.6-pro-10s": 3,
156
160
 
157
161
  "api-vidu": 0.09,
158
162
  "api-vidu-vip": 0.3,
@@ -172,10 +176,10 @@ MODEL_PRICE = {
172
176
 
173
177
  # all
174
178
  "o1-plus": 0.2,
175
- "o1-pro": 0.5,
179
+ "o1-pro": 0.6,
176
180
 
177
181
  "o1-mini-all": 0.2,
178
- "o1-preview-all": 0.5,
182
+ "o1-preview-all": 0.6,
179
183
 
180
184
  "gpt-4-all": 0.1,
181
185
  "gpt-4o-all": 0.1,
@@ -294,23 +298,29 @@ MODEL_RATIO = {
294
298
  "glm-4-0520": 2.5,
295
299
  "glm-4-airx": 10,
296
300
  "glm-4v": 2.5,
297
- "glm-4v-plus": 2.5, # 2.5
301
+ "glm-4v-plus": 5,
298
302
  "glm-4v-flash": 0.1,
299
303
  "glm-4-plus": 25,
300
304
 
305
+ "glm-zero": 5,
306
+ "glm-zero-preview": 5,
307
+
301
308
  # 月之暗面 https://platform.moonshot.cn/docs/price/chat#%E4%BA%A7%E5%93%81%E5%AE%9A%E4%BB%B7
302
309
  "moonshot-v1-8k": 6 / 2, # 特价
303
310
  "moonshot-v1-32k": 12 / 2, # 特价
304
311
  "moonshot-v1-128k": 60 / 2, # 特价
305
312
 
306
313
  # 阿里千问 https://dashscope.console.aliyun.com/billing
307
- "qwen-long": 0.5,
314
+ "qwen-long": 0.25,
308
315
  "qwen-turbo": 0.05,
309
316
  "qwen-plus": 2,
310
- "qwen-max": 20,
317
+ "qwen-max": 10,
311
318
  "qwen-max-longcontext": 20,
312
319
  "qwen-turbo-2024-11-01": 0.15,
313
320
 
321
+ "qwen-vl-max-latest": 1.5,
322
+ "qwen-vl-plus-latest": 0.75,
323
+
314
324
  "qwen2.5-coder-7b-instruct": 0.05,
315
325
  "qwen2.5-7b-instruct": 0.05,
316
326
  "qwen2.5-14b-instruct": 0.7 / 2,
@@ -373,18 +383,22 @@ MODEL_RATIO = {
373
383
 
374
384
  # deepseek
375
385
  "deepseek-chat": 0.5,
376
- "deepseek-coder": 0.5,
377
- 'deepseek-coder-v2-instruct': 0.5,
378
- 'deepseek-v2-chat': 0.5,
379
- 'deepseek-llm-67b-chat': 0.5,
380
386
  "deepseek-ai/deepseek-vl2": 0.5,
381
387
 
388
+ "deepseek-v3": 0.5,
389
+ "deepseek/deepseek-chat": 0.5,
390
+ "deepseek-ai/DeepSeek-V3": 0.5,
391
+
392
+ 'deepseek-r1': 0.5,
393
+ 'deepseek-think': 0.5,
394
+ "deepseek-search": 0.5,
395
+
382
396
  # 豆包
383
397
  "doubao-lite-128k": 0.4,
384
398
  "doubao-lite-32k": 0.15,
385
399
  "doubao-lite-4k": 0.15,
386
400
 
387
- "doubao-pro-256k": 0.01,
401
+ "doubao-pro-256k": 5,
388
402
 
389
403
  "doubao-pro-128k": 2.5,
390
404
  "doubao-pro-32k": 0.4,
@@ -643,14 +657,26 @@ COMPLETION_RATIO = {
643
657
  "qwq-32b-preview": 3,
644
658
  "qvq-72b-preview": 3,
645
659
 
646
- "qwen-long": 5,
647
- "qwen-max": 5,
648
- "glm-4v-flash": 5,
660
+ "qwen-long": 4,
661
+ "qwen-max": 3,
662
+ "qwen-vl-max-latest": 3,
663
+ "qwen-vl-plus-latest": 3,
649
664
 
650
665
  "deepseek-ai/deepseek-vl2": 3,
651
666
  "doubao-vision-lite-32k": 3,
652
667
  "doubao-vision-pro-32k": 3,
653
668
 
669
+ "deepseek-v3": 1,
670
+ 'deepseek-r1': 1,
671
+ 'deepseek-think': 1,
672
+ "deepseek-search": 1,
673
+ "deepseek/deepseek-chat": 1,
674
+ "deepseek-ai/DeepSeek-V3": 1,
675
+
676
+ "glm-zero": 5,
677
+ "glm-zero-preview": 5,
678
+ "glm-4v-flash": 5,
679
+
654
680
  }
655
681
 
656
682
  REDIRECT_MODEL = {
@@ -716,7 +742,7 @@ REDIRECT_MODEL = {
716
742
  "qwen2.5-coder-7b-instruct": "Qwen/Qwen2.5-Coder-7B-Instruct",
717
743
  "qwen2.5-coder-32b-instruct": "Qwen/Qwen2.5-Coder-32B-Instruct",
718
744
 
719
- "qwen-turbo": "Qwen/Qwen2.5-7B-Instruct",
745
+ "qwen-turbo": "Qwen/Qwen2.5-7B-Instruct", # 兜底
720
746
  'qwen2-1.5b-instruct': 'Qwen/Qwen2-1.5B-Instruct',
721
747
  'qwen2-7b-instruct': 'Qwen/Qwen2-7B-Instruct',
722
748
  'qwen2-72b-instruct': 'Qwen/Qwen2-72B-Instruct',
@@ -312,7 +312,6 @@ class STTRequest(BaseModel): # ASR
312
312
  if __name__ == '__main__':
313
313
  pass
314
314
 
315
-
316
315
  # print(ChatCompletion(choices=[Choice(message=ChatCompletionMessage(content="ChatCompletion"))]))
317
316
  # print(ChatCompletionChunk(choices=[ChunkChoice(delta=ChoiceDelta(content="ChatCompletionChunk"))]))
318
317
  #
@@ -348,8 +347,20 @@ if __name__ == '__main__':
348
347
  # print(req1.model_dump()) # 输出: {'guidance_scale': 5.0}
349
348
  # print(req1.model_dump(by_alias=True)) # 输出: {'guidance': 5.0}
350
349
 
351
- class A(BaseModel):
352
- n: int = Field(1, ge=1, le=0)
353
-
354
-
355
- print(A(n=11))
350
+ # class A(BaseModel):
351
+ # n: int = Field(1, ge=1, le=0)
352
+ #
353
+ #
354
+ # print(A(n=11))
355
+ messages = [
356
+ {
357
+ "role": "user",
358
+ "content": [{'role': 'user', 'content': [{"type": "image_url", "image_url": "这是个图片链接"}]}]
359
+ },
360
+
361
+ # {'role': 'user', 'content': [{"type": "image_url", "image_url": {"url": "这是个图片链接"}}]},
362
+ ]
363
+
364
+ r = ChatCompletionRequest(model="gpt-3.5-turbo", messages=messages)
365
+ r.messages[-1]['content'] = [{"type": "image_url", "image_url": {"url": r.urls[-1]}}]
366
+ print(r)