MeUtils 2025.5.15.14.3.22__py3-none-any.whl → 2025.5.27.14.55.19__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 (36) hide show
  1. {MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.27.14.55.19.dist-info}/METADATA +265 -265
  2. {MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.27.14.55.19.dist-info}/RECORD +35 -30
  3. examples/_openaisdk/openai_audio.py +5 -3
  4. examples/_openaisdk/openai_chatfire.py +5 -0
  5. meutils/ai_audio/asr/openai_asr.py +5 -5
  6. meutils/apis/dreamfaceapp/__init__.py +11 -0
  7. meutils/apis/dreamfaceapp/audios.py +31 -0
  8. meutils/apis/dreamfaceapp/images.py +110 -0
  9. meutils/apis/dreamfaceapp/videos.py +115 -0
  10. meutils/apis/fal/videos.py +1 -0
  11. meutils/apis/google/chat.py +3 -0
  12. meutils/apis/google/gemini_sdk.py +34 -0
  13. meutils/apis/images/recraft.py +11 -8
  14. meutils/apis/jimeng/audio.py +1 -1
  15. meutils/apis/jimeng/doubao_images.py +70 -0
  16. meutils/apis/jimeng/doubao_utils.py +4 -4
  17. meutils/apis/jimeng/videos.py +2 -0
  18. meutils/apis/oneapi/channel.py +11 -7
  19. meutils/apis/oneapi/user.py +1 -1
  20. meutils/apis/siliconflow/videos.py +8 -15
  21. meutils/config_utils/lark_utils/common.py +4 -4
  22. meutils/data/VERSION +1 -1
  23. meutils/io/files_utils.py +5 -3
  24. meutils/io/openai_files.py +3 -2
  25. meutils/llm/completions/chat_spark.py +31 -13
  26. meutils/llm/completions/qwenllm.py +13 -16
  27. meutils/llm/openai_polling/chat.py +2 -2
  28. meutils/office_automation/pdf.py +38 -2
  29. meutils/pipe.py +4 -1
  30. meutils/schemas/dreamfaceapp_types.py +12 -0
  31. meutils/schemas/oneapi/common.py +35 -19
  32. meutils/apis/jimeng/doubao.py +0 -68
  33. {MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.27.14.55.19.dist-info}/LICENSE +0 -0
  34. {MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.27.14.55.19.dist-info}/WHEEL +0 -0
  35. {MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.27.14.55.19.dist-info}/entry_points.txt +0 -0
  36. {MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.27.14.55.19.dist-info}/top_level.txt +0 -0
@@ -413,9 +413,6 @@ MODEL_RATIO = {
413
413
  'baichuan3-turbo-128k': 12,
414
414
  'baichuan2-turbo': 4,
415
415
 
416
- "claude-3-5-haiku-20241022": 0.5,
417
- "anthropic/claude-3-5-haiku-20241022:beta": 0.5,
418
-
419
416
  # grok
420
417
  "grok-2": 1,
421
418
  "grok-2-1212": 1,
@@ -671,6 +668,7 @@ MODEL_RATIO = {
671
668
  "doubao-1-5-thinking-pro-vision": 2,
672
669
  "doubao-1-5-thinking-pro-vision-250415": 2,
673
670
  "doubao-1-5-thinking-pro-m-250415": 2,
671
+ "doubao-1-5-thinking-pro-m-250428": 2,
674
672
 
675
673
  # 商汤 https://platform.sensenova.cn/pricing
676
674
  # https://platform.sensenova.cn/doc?path=/pricingdoc/pricing.md
@@ -712,6 +710,11 @@ MODEL_RATIO = {
712
710
  "tts-1-hd-1106": 15,
713
711
  "whisper-1": 15,
714
712
 
713
+ # claude
714
+
715
+ "claude-3-5-haiku-20241022": 0.5,
716
+ "anthropic/claude-3-5-haiku-20241022:beta": 0.5,
717
+
715
718
  "claude-3-haiku-20240307": 0.125,
716
719
  "claude-3-sonnet-20240229": 1.5,
717
720
 
@@ -731,6 +734,11 @@ MODEL_RATIO = {
731
734
 
732
735
  "claude-3-7-sonnet-20250219": 1.5,
733
736
 
737
+ "claude-sonnet-4-20250514": 1.5,
738
+ "claude-sonnet-4-20250514-thinking": 1.5,
739
+ "claude-opus-4-20250514": 7.5,
740
+ "claude-opus-4-20250514-thinking": 7.5,
741
+
734
742
  "deepclaude": 1.5,
735
743
  "deep-claude": 1.5,
736
744
 
@@ -774,6 +782,7 @@ MODEL_RATIO = {
774
782
  "gemini-2.0-flash-thinking-exp-01-21": 0.075,
775
783
 
776
784
  "gemini-2.5-flash-preview-04-17": 0.075,
785
+ "gemini-2.5-flash-preview-05-20": 0.075,
777
786
 
778
787
  "gemini-2.0-pro": 0.625,
779
788
  "gemini-2.0-pro-exp": 0.625,
@@ -793,11 +802,12 @@ MODEL_RATIO = {
793
802
  "gemini-pro-vision": 1,
794
803
  "gemini-ultra": 1,
795
804
 
796
- "gemini-2.5-flash-thinking": 0.15,
797
- "gemini-2.5-flash-preview-04-17-thinking": 0.15 * 2,
798
- "gemini-2.5-pro-thinking": 0.625 * 2,
799
- "gemini-2.5-pro-exp-03-25-thinking": 0.625 * 2,
800
- "gemini-2.5-pro-preview-03-25-thinking": 0.625 * 2,
805
+ "gemini-2.5-flash-thinking": 0.075,
806
+ "gemini-2.5-flash-preview-04-17-thinking": 0.075,
807
+ "gemini-2.5-flash-preview-05-20-thinking": 0.075,
808
+ "gemini-2.5-pro-thinking": 0.625,
809
+ "gemini-2.5-pro-exp-03-25-thinking": 0.625,
810
+ "gemini-2.5-pro-preview-03-25-thinking": 0.625,
801
811
 
802
812
  "gemini-thinking": 0.625, # 逆向
803
813
 
@@ -954,9 +964,6 @@ COMPLETION_RATIO = {
954
964
  "grok-3-mini-beta": 5 / 3,
955
965
  "grok-3-mini-fast-beta": 4 / 0.6,
956
966
 
957
- "claude-3-5-haiku-20241022": 5,
958
- "anthropic/claude-3-5-haiku-20241022:beta": 5,
959
-
960
967
  "gpt-4-all": 4,
961
968
  "gpt-4-gizmo-*": 4,
962
969
  "gpt-4o-all": 4,
@@ -989,6 +996,9 @@ COMPLETION_RATIO = {
989
996
  "gpt-image-1": 8,
990
997
 
991
998
  # claude
999
+ "claude-3-5-haiku-20241022": 5,
1000
+ "anthropic/claude-3-5-haiku-20241022:beta": 5,
1001
+
992
1002
  "claude-3-opus-20240229": 5,
993
1003
  "anthropic/claude-3-opus:beta": 5, # openrouter
994
1004
 
@@ -1000,6 +1010,11 @@ COMPLETION_RATIO = {
1000
1010
  "claude-3-7-sonnet-20250219": 5,
1001
1011
  "claude-3-7-sonnet-latest-thinking": 5,
1002
1012
 
1013
+ "claude-sonnet-4-20250514": 5,
1014
+ "claude-sonnet-4-20250514-thinking": 5,
1015
+ "claude-opus-4-20250514": 5,
1016
+ "claude-opus-4-20250514-thinking": 5,
1017
+
1003
1018
  "llama-3.1-70b-instruct": 2,
1004
1019
  "meta-llama/Meta-Llama-3.1-70B-Instruct": 2,
1005
1020
 
@@ -1063,11 +1078,13 @@ COMPLETION_RATIO = {
1063
1078
  "gemma2-27b-it": 4,
1064
1079
  "google/gemma-3-27b-it": 4,
1065
1080
  # thinking
1066
- "gemini-2.5-flash-thinking": 8,
1067
- "gemini-2.5-flash-preview-04-17-thinking": 8,
1068
- "gemini-2.5-pro-thinking": 8,
1069
- "gemini-2.5-pro-exp-03-25-thinking": 8,
1070
- "gemini-2.5-pro-preview-03-25-thinking": 8,
1081
+ "gemini-2.5-flash-thinking": 23,
1082
+ "gemini-2.5-flash-preview-04-17-thinking": 23,
1083
+ "gemini-2.5-flash-preview-05-20-thinking": 23,
1084
+
1085
+ "gemini-2.5-pro-thinking": 23,
1086
+ "gemini-2.5-pro-exp-03-25-thinking": 23,
1087
+ "gemini-2.5-pro-preview-03-25-thinking": 23,
1071
1088
 
1072
1089
  "hunyuan-a52b-instruct": 5,
1073
1090
  "qwen2.5-coder-32b-instruct": 3,
@@ -1097,7 +1114,6 @@ COMPLETION_RATIO = {
1097
1114
 
1098
1115
  "qwen-plus": 2.5,
1099
1116
 
1100
-
1101
1117
  "qwq-plus": 2.5,
1102
1118
  "qwq-max": 2.5,
1103
1119
  "qwq-max-search": 4,
@@ -1161,6 +1177,7 @@ COMPLETION_RATIO = {
1161
1177
  "doubao-1-5-thinking-pro-vision": 4,
1162
1178
  "doubao-1-5-thinking-pro-vision-250415": 4,
1163
1179
  "doubao-1-5-thinking-pro-m-250415": 4,
1180
+ "doubao-1-5-thinking-pro-m-250428": 4,
1164
1181
 
1165
1182
  "doubao-1-5-thinking-vision-pro-250428": 3,
1166
1183
 
@@ -1379,8 +1396,7 @@ REDIRECT_MODEL = {
1379
1396
  "todo": "gpt-4-vision-preview",
1380
1397
 
1381
1398
  # https://chat.tune.app/api/models
1382
- "claude-3-haiku-20240307": "anthropic/claude-3-haiku",
1383
- "claude-3-5-sonnet-20240620": "anthropic/claude-3.5-sonnet",
1399
+
1384
1400
  "gpt-4o": "openai/gpt-4o",
1385
1401
  "gpt-4o-mini": "openai/gpt-4o-mini",
1386
1402
  "mistral-large": "mistral/mistral-large",
@@ -1,68 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
- # @Project : AI. @by PyCharm
4
- # @File : images
5
- # @Time : 2024/12/16 17:46
6
- # @Author : betterme
7
- # @WeChat : meutils
8
- # @Software : PyCharm
9
- # @Description :
10
-
11
- from openai import AsyncClient
12
- from meutils.pipe import *
13
- from meutils.apis.jimeng.doubao_utils import generate_cookie
14
-
15
- from meutils.schemas.image_types import ImageRequest
16
-
17
- from meutils.schemas.jimeng_types import BASE_URL, MODELS_MAP, FEISHU_URL
18
- from meutils.apis.jimeng.common import create_draft_content, get_headers, check_token
19
- from meutils.config_utils.lark_utils import get_next_token_for_polling
20
-
21
-
22
- async def create_():
23
- headers = {
24
- 'agw-js-conv': 'str',
25
- 'Cookie': 's_v_web_id=verify_m4t9wrdc_qgbhUw0z_07iP_4GFV_8HA7_6jr0e9lLCqQO; passport_csrf_token=8a8aa82fa109ecb3cb25e7afa10de214; passport_csrf_token_default=8a8aa82fa109ecb3cb25e7afa10de214; oauth_token=e45378cb-5afd-4495-88f5-58440e321b48; n_mh=lG4jjJNpPRqpnflIMXQoPMflNZdP31M8fFqgdR9Id5g; uid_tt=1a11a8af13cf1c878482fa862287107c; uid_tt_ss=1a11a8af13cf1c878482fa862287107c; sid_tt=de2215a7bb8e442774cf388f03fac84c; sessionid=de2215a7bb8e442774cf388f03fac84c; sessionid_ss=de2215a7bb8e442774cf388f03fac84c; is_staff_user=false; store-region=cn-js; store-region-src=uid; odin_tt=774fcc6d25d5259fd2af19858e0518c64943eb788718658b403ad8eb13ebbc6ebcb4c42620e87a48b2efb45fe78dc163b82399750898bb201c89f324b9e25b94; passport_auth_status=042935fbff60617ac0735d3ba4cfb559%2C7c535e1ccd98b367728b6560feb66a2e; passport_auth_status_ss=042935fbff60617ac0735d3ba4cfb559%2C7c535e1ccd98b367728b6560feb66a2e; sid_guard=de2215a7bb8e442774cf388f03fac84c%7C1734489199%7C5184000%7CSun%2C+16-Feb-2025+02%3A33%3A19+GMT; sid_ucp_v1=1.0.0-KGQyN2NlYjIxNTA1NTc3ZjI3NWQ2MjZkY2FhNGM3MGM0NzdkNGVjZDMKHwjAreC708zWBBDv6Ii7BhjCsR4gDDDn782qBjgIQCYaAmxxIiBkZTIyMTVhN2JiOGU0NDI3NzRjZjM4OGYwM2ZhYzg0Yw; ssid_ucp_v1=1.0.0-KGQyN2NlYjIxNTA1NTc3ZjI3NWQ2MjZkY2FhNGM3MGM0NzdkNGVjZDMKHwjAreC708zWBBDv6Ii7BhjCsR4gDDDn782qBjgIQCYaAmxxIiBkZTIyMTVhN2JiOGU0NDI3NzRjZjM4OGYwM2ZhYzg0Yw; ttwid=1%7C4rAQ216JOophOdIJRX4cHa6E8FSBjbjqHCKmFCNrQuc%7C1734510550%7C6217dce55189d102c393a4de7022e9ee2e2fa75f211108551b349a0a04532921; passport_fe_beating_status=true; tt_scid=b.csKGNI6QALEo8gG9vJu3nCfptGnLkTxVXPX.wNPQ0q9PaXuKzXfuFQC0i2U7gVa974; gd_random_1831913=eyJtYXRjaCI6ZmFsc2UsInBlcmNlbnQiOjAuMjIzMzcxMDAwNzk1MzUxNzd9.NuOx3z2e4BUOJrwTMG9F3lxrnhmz9jNR6BrhQYU4BhI; gd_random_1525008=eyJtYXRjaCI6ZmFsc2UsInBlcmNlbnQiOjAuMjIzMzcxMDAwNzk1MzUxNzd9.NuOx3z2e4BUOJrwTMG9F3lxrnhmz9jNR6BrhQYU4BhI; gd_random_1831904=eyJtYXRjaCI6ZmFsc2UsInBlcmNlbnQiOjAuMjIzMzcxMDAwNzk1MzUxNzd9.NuOx3z2e4BUOJrwTMG9F3lxrnhmz9jNR6BrhQYU4BhI; msToken=enism5q1i_XLtL8VKKjkjidcvGhyW0U3EGJBI19P3fyqk8NsW4fXW4g8s4TnlgRaF-aWS0kHrmNnENw5L4mFRyyz6A5yZbpR3nCRYJrvBi3-GrtptyOBhznILSv4OO0',
26
- 'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
27
- 'content-type': 'application/json'
28
- }
29
- payload = {
30
- "messages": [
31
- {
32
- "content": "{\"text\":\"颜色反转\"}",
33
- "content_type": 2009,
34
- "attachments": [
35
- {
36
- "type": "image",
37
- "key": "tos-cn-i-a9rns2rl98/b87240eb828f43f8a87952e8246f2143.png",
38
- "extra": {
39
- "refer_types": "style"
40
- },
41
- "identifier": "2c4b5ab0-bd1a-11ef-b0b0-d38662f7353b"
42
- }
43
- ]
44
- }
45
- ],
46
- "completion_option": {
47
- "is_regen": False,
48
- "with_suggest": False,
49
- "need_create_conversation": False,
50
- "launch_stage": 1,
51
- "is_replace": False,
52
- "is_delete": False,
53
- "message_from": 0,
54
- "event_id": "0"
55
- },
56
- "section_id": "533682637787650",
57
- "conversation_id": "533682637787394",
58
- "local_message_id": "71ee47b0-bd1c-11ef-b0b0-d38662f7353b"
59
- }
60
-
61
- client = AsyncClient(base_url="https://www.doubao.com/samantha", default_headers=headers, api_key='xx')
62
- response = await client.post("/chat/completion", body=payload, cast_to=object, stream=True)
63
- for i in response:
64
- print(i)
65
- # return response
66
-
67
- if __name__ == '__main__':
68
- arun(create())