MeUtils 2025.5.15.14.3.22__py3-none-any.whl → 2025.5.29.18.12.8__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.
- {MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.29.18.12.8.dist-info}/METADATA +262 -262
- {MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.29.18.12.8.dist-info}/RECORD +44 -37
- examples/_openaisdk/openai_audio.py +5 -3
- examples/_openaisdk/openai_chatfire.py +5 -0
- examples/_openaisdk/openai_sophnet.py +47 -0
- meutils/ai_audio/asr/openai_asr.py +5 -5
- meutils/apis/audio/minimax.py +202 -0
- meutils/apis/dreamfaceapp/__init__.py +11 -0
- meutils/apis/dreamfaceapp/audios.py +31 -0
- meutils/apis/dreamfaceapp/images.py +110 -0
- meutils/apis/dreamfaceapp/videos.py +115 -0
- meutils/apis/fal/videos.py +1 -0
- meutils/apis/google/chat.py +3 -0
- meutils/apis/google/gemini_sdk.py +34 -0
- meutils/apis/images/recraft.py +11 -8
- meutils/apis/jimeng/audio.py +1 -1
- meutils/apis/jimeng/doubao_images.py +70 -0
- meutils/apis/jimeng/doubao_utils.py +4 -4
- meutils/apis/jimeng/videos.py +8 -3
- meutils/apis/oneapi/channel.py +11 -7
- meutils/apis/oneapi/user.py +1 -1
- meutils/apis/search/metaso.py +26 -8
- meutils/apis/siliconflow/videos.py +9 -16
- meutils/apis/volcengine_apis/__init__.py +0 -1
- meutils/apis/volcengine_apis/images.py +5 -4
- meutils/apis/volcengine_apis/tasks.py +74 -8
- meutils/config_utils/lark_utils/common.py +5 -5
- meutils/data/VERSION +1 -1
- meutils/io/files_utils.py +5 -3
- meutils/io/openai_files.py +3 -2
- meutils/llm/check_utils.py +35 -3
- meutils/llm/completions/chat_spark.py +31 -13
- meutils/llm/completions/qwenllm.py +25 -18
- meutils/llm/openai_polling/chat.py +2 -2
- meutils/office_automation/pdf.py +38 -2
- meutils/pipe.py +4 -1
- meutils/schemas/dreamfaceapp_types.py +12 -0
- meutils/schemas/metaso_types.py +9 -3
- meutils/schemas/oneapi/common.py +59 -21
- meutils/schemas/openai_types.py +5 -2
- meutils/apis/jimeng/doubao.py +0 -68
- {MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.29.18.12.8.dist-info}/LICENSE +0 -0
- {MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.29.18.12.8.dist-info}/WHEEL +0 -0
- {MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.29.18.12.8.dist-info}/entry_points.txt +0 -0
- {MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.29.18.12.8.dist-info}/top_level.txt +0 -0
meutils/schemas/oneapi/common.py
CHANGED
@@ -49,8 +49,8 @@ MODEL_PRICE = {
|
|
49
49
|
"kling_effects": 1,
|
50
50
|
|
51
51
|
"kling_video": 1.2,
|
52
|
-
"kling_extend": 1
|
53
|
-
"kling_lip_sync": 1
|
52
|
+
"kling_extend": 1,
|
53
|
+
"kling_lip_sync": 1,
|
54
54
|
|
55
55
|
"minimax_files_retrieve": 0.01,
|
56
56
|
|
@@ -66,6 +66,16 @@ MODEL_PRICE = {
|
|
66
66
|
"minimax_video-01": MINIMAX_VIDEO,
|
67
67
|
"minimax_video-01-live2d": MINIMAX_VIDEO,
|
68
68
|
|
69
|
+
# 火山
|
70
|
+
"api-volcengine-high_aes_general_v30l_zt2i": 0.05,
|
71
|
+
"api-volcengine-byteedit_v2.0": 0.05,
|
72
|
+
|
73
|
+
# videos
|
74
|
+
"api-videos-wan-ai/wan2.1-t2v-14b": 1.2,
|
75
|
+
"api-videos-wan-ai/wan2.1-t2v-14b-turbo": 1.2,
|
76
|
+
"api-videos-wan-ai/wan2.1-i2v-14b-720p": 1.2,
|
77
|
+
"api-videos-wan-ai/wan2.1-i2v-14b-720p-turbo": 1.2,
|
78
|
+
|
69
79
|
# chatfire
|
70
80
|
"ppu-0001": 0.0001,
|
71
81
|
"ppu-001": 0.001,
|
@@ -297,7 +307,15 @@ MODEL_PRICE = {
|
|
297
307
|
"net-gpt-4": 0.1,
|
298
308
|
"perplexity": 0.01,
|
299
309
|
"net-claude": 0.015,
|
310
|
+
|
311
|
+
# 秘塔
|
300
312
|
"meta-search": 0.02,
|
313
|
+
"meta-deepsearch": 0.05,
|
314
|
+
"meta-deepresearch": 0.1,
|
315
|
+
|
316
|
+
"meta-search:scholar": 0.02,
|
317
|
+
"meta-deepsearch:scholar": 0.05,
|
318
|
+
"meta-deepresearch:scholar": 0.1,
|
301
319
|
|
302
320
|
# 逆向
|
303
321
|
"cogview-3": 0.01,
|
@@ -413,9 +431,6 @@ MODEL_RATIO = {
|
|
413
431
|
'baichuan3-turbo-128k': 12,
|
414
432
|
'baichuan2-turbo': 4,
|
415
433
|
|
416
|
-
"claude-3-5-haiku-20241022": 0.5,
|
417
|
-
"anthropic/claude-3-5-haiku-20241022:beta": 0.5,
|
418
|
-
|
419
434
|
# grok
|
420
435
|
"grok-2": 1,
|
421
436
|
"grok-2-1212": 1,
|
@@ -583,6 +598,7 @@ MODEL_RATIO = {
|
|
583
598
|
"deepseek-v3": 1,
|
584
599
|
"deepseek-v3-0324": 1,
|
585
600
|
"deepseek-v3-250324": 1,
|
601
|
+
"deepseek-v3-fast": 1,
|
586
602
|
|
587
603
|
"deepseek-v3-8k": 0.5,
|
588
604
|
"deepseek-v3-128k": 5,
|
@@ -600,6 +616,7 @@ MODEL_RATIO = {
|
|
600
616
|
'deepseek-reasoner': 2,
|
601
617
|
'deepseek-reasoner-8k': 1,
|
602
618
|
"deepseek-r1-250120": 2,
|
619
|
+
"deepseek-r1-0528": 2,
|
603
620
|
|
604
621
|
"deepseek-search": 1,
|
605
622
|
'deepseek-r1-search': 2,
|
@@ -671,6 +688,7 @@ MODEL_RATIO = {
|
|
671
688
|
"doubao-1-5-thinking-pro-vision": 2,
|
672
689
|
"doubao-1-5-thinking-pro-vision-250415": 2,
|
673
690
|
"doubao-1-5-thinking-pro-m-250415": 2,
|
691
|
+
"doubao-1-5-thinking-pro-m-250428": 2,
|
674
692
|
|
675
693
|
# 商汤 https://platform.sensenova.cn/pricing
|
676
694
|
# https://platform.sensenova.cn/doc?path=/pricingdoc/pricing.md
|
@@ -712,6 +730,11 @@ MODEL_RATIO = {
|
|
712
730
|
"tts-1-hd-1106": 15,
|
713
731
|
"whisper-1": 15,
|
714
732
|
|
733
|
+
# claude
|
734
|
+
|
735
|
+
"claude-3-5-haiku-20241022": 0.5,
|
736
|
+
"anthropic/claude-3-5-haiku-20241022:beta": 0.5,
|
737
|
+
|
715
738
|
"claude-3-haiku-20240307": 0.125,
|
716
739
|
"claude-3-sonnet-20240229": 1.5,
|
717
740
|
|
@@ -731,6 +754,11 @@ MODEL_RATIO = {
|
|
731
754
|
|
732
755
|
"claude-3-7-sonnet-20250219": 1.5,
|
733
756
|
|
757
|
+
"claude-sonnet-4-20250514": 1.5,
|
758
|
+
"claude-sonnet-4-20250514-thinking": 1.5,
|
759
|
+
"claude-opus-4-20250514": 7.5,
|
760
|
+
"claude-opus-4-20250514-thinking": 7.5,
|
761
|
+
|
734
762
|
"deepclaude": 1.5,
|
735
763
|
"deep-claude": 1.5,
|
736
764
|
|
@@ -774,6 +802,7 @@ MODEL_RATIO = {
|
|
774
802
|
"gemini-2.0-flash-thinking-exp-01-21": 0.075,
|
775
803
|
|
776
804
|
"gemini-2.5-flash-preview-04-17": 0.075,
|
805
|
+
"gemini-2.5-flash-preview-05-20": 0.075,
|
777
806
|
|
778
807
|
"gemini-2.0-pro": 0.625,
|
779
808
|
"gemini-2.0-pro-exp": 0.625,
|
@@ -793,11 +822,12 @@ MODEL_RATIO = {
|
|
793
822
|
"gemini-pro-vision": 1,
|
794
823
|
"gemini-ultra": 1,
|
795
824
|
|
796
|
-
"gemini-2.5-flash-thinking": 0.
|
797
|
-
"gemini-2.5-flash-preview-04-17-thinking": 0.
|
798
|
-
"gemini-2.5-
|
799
|
-
"gemini-2.5-pro-
|
800
|
-
"gemini-2.5-pro-
|
825
|
+
"gemini-2.5-flash-thinking": 0.075,
|
826
|
+
"gemini-2.5-flash-preview-04-17-thinking": 0.075,
|
827
|
+
"gemini-2.5-flash-preview-05-20-thinking": 0.075,
|
828
|
+
"gemini-2.5-pro-thinking": 0.625,
|
829
|
+
"gemini-2.5-pro-exp-03-25-thinking": 0.625,
|
830
|
+
"gemini-2.5-pro-preview-03-25-thinking": 0.625,
|
801
831
|
|
802
832
|
"gemini-thinking": 0.625, # 逆向
|
803
833
|
|
@@ -954,9 +984,6 @@ COMPLETION_RATIO = {
|
|
954
984
|
"grok-3-mini-beta": 5 / 3,
|
955
985
|
"grok-3-mini-fast-beta": 4 / 0.6,
|
956
986
|
|
957
|
-
"claude-3-5-haiku-20241022": 5,
|
958
|
-
"anthropic/claude-3-5-haiku-20241022:beta": 5,
|
959
|
-
|
960
987
|
"gpt-4-all": 4,
|
961
988
|
"gpt-4-gizmo-*": 4,
|
962
989
|
"gpt-4o-all": 4,
|
@@ -989,6 +1016,9 @@ COMPLETION_RATIO = {
|
|
989
1016
|
"gpt-image-1": 8,
|
990
1017
|
|
991
1018
|
# claude
|
1019
|
+
"claude-3-5-haiku-20241022": 5,
|
1020
|
+
"anthropic/claude-3-5-haiku-20241022:beta": 5,
|
1021
|
+
|
992
1022
|
"claude-3-opus-20240229": 5,
|
993
1023
|
"anthropic/claude-3-opus:beta": 5, # openrouter
|
994
1024
|
|
@@ -1000,6 +1030,11 @@ COMPLETION_RATIO = {
|
|
1000
1030
|
"claude-3-7-sonnet-20250219": 5,
|
1001
1031
|
"claude-3-7-sonnet-latest-thinking": 5,
|
1002
1032
|
|
1033
|
+
"claude-sonnet-4-20250514": 5,
|
1034
|
+
"claude-sonnet-4-20250514-thinking": 5,
|
1035
|
+
"claude-opus-4-20250514": 5,
|
1036
|
+
"claude-opus-4-20250514-thinking": 5,
|
1037
|
+
|
1003
1038
|
"llama-3.1-70b-instruct": 2,
|
1004
1039
|
"meta-llama/Meta-Llama-3.1-70B-Instruct": 2,
|
1005
1040
|
|
@@ -1063,11 +1098,13 @@ COMPLETION_RATIO = {
|
|
1063
1098
|
"gemma2-27b-it": 4,
|
1064
1099
|
"google/gemma-3-27b-it": 4,
|
1065
1100
|
# thinking
|
1066
|
-
"gemini-2.5-flash-thinking":
|
1067
|
-
"gemini-2.5-flash-preview-04-17-thinking":
|
1068
|
-
"gemini-2.5-
|
1069
|
-
|
1070
|
-
"gemini-2.5-pro-
|
1101
|
+
"gemini-2.5-flash-thinking": 23,
|
1102
|
+
"gemini-2.5-flash-preview-04-17-thinking": 23,
|
1103
|
+
"gemini-2.5-flash-preview-05-20-thinking": 23,
|
1104
|
+
|
1105
|
+
"gemini-2.5-pro-thinking": 23,
|
1106
|
+
"gemini-2.5-pro-exp-03-25-thinking": 23,
|
1107
|
+
"gemini-2.5-pro-preview-03-25-thinking": 23,
|
1071
1108
|
|
1072
1109
|
"hunyuan-a52b-instruct": 5,
|
1073
1110
|
"qwen2.5-coder-32b-instruct": 3,
|
@@ -1097,7 +1134,6 @@ COMPLETION_RATIO = {
|
|
1097
1134
|
|
1098
1135
|
"qwen-plus": 2.5,
|
1099
1136
|
|
1100
|
-
|
1101
1137
|
"qwq-plus": 2.5,
|
1102
1138
|
"qwq-max": 2.5,
|
1103
1139
|
"qwq-max-search": 4,
|
@@ -1161,6 +1197,7 @@ COMPLETION_RATIO = {
|
|
1161
1197
|
"doubao-1-5-thinking-pro-vision": 4,
|
1162
1198
|
"doubao-1-5-thinking-pro-vision-250415": 4,
|
1163
1199
|
"doubao-1-5-thinking-pro-m-250415": 4,
|
1200
|
+
"doubao-1-5-thinking-pro-m-250428": 4,
|
1164
1201
|
|
1165
1202
|
"doubao-1-5-thinking-vision-pro-250428": 3,
|
1166
1203
|
|
@@ -1188,11 +1225,13 @@ COMPLETION_RATIO = {
|
|
1188
1225
|
"deepseek-v3-0324": 4,
|
1189
1226
|
"deepseek-v3-250324": 4,
|
1190
1227
|
"deepseek-chat": 4,
|
1228
|
+
"deepseek-v3-fast": 4,
|
1191
1229
|
|
1192
1230
|
'deepseek-r1': 4,
|
1193
1231
|
'deepseek-reasoner': 4,
|
1194
1232
|
"deepseek-reasoner-164k": 8,
|
1195
1233
|
"deepseek-r1-250120": 4,
|
1234
|
+
"deepseek-r1-0528": 4,
|
1196
1235
|
|
1197
1236
|
"deepseek-chat:function": 4,
|
1198
1237
|
|
@@ -1379,8 +1418,7 @@ REDIRECT_MODEL = {
|
|
1379
1418
|
"todo": "gpt-4-vision-preview",
|
1380
1419
|
|
1381
1420
|
# https://chat.tune.app/api/models
|
1382
|
-
|
1383
|
-
"claude-3-5-sonnet-20240620": "anthropic/claude-3.5-sonnet",
|
1421
|
+
|
1384
1422
|
"gpt-4o": "openai/gpt-4o",
|
1385
1423
|
"gpt-4o-mini": "openai/gpt-4o-mini",
|
1386
1424
|
"mistral-large": "mistral/mistral-large",
|
meutils/schemas/openai_types.py
CHANGED
@@ -427,11 +427,14 @@ class ImagesResponse(_ImagesResponse):
|
|
427
427
|
|
428
428
|
class TTSRequest(BaseModel):
|
429
429
|
model: Optional[Union[str, Literal["tts-1", "tts-1-hd"]]] = 'tts'
|
430
|
-
voice: Optional[Union[str, Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer"
|
430
|
+
voice: Optional[Union[str, Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer",
|
431
|
+
"male", "femal",
|
432
|
+
]]] = ""
|
431
433
|
|
432
434
|
input: str
|
433
435
|
instructions: Optional[str] = None
|
434
|
-
|
436
|
+
emotion: Optional[Literal[
|
437
|
+
"happy", "angry", "surprise", "coldness", "disgust", "fear", "excited", "hate", "sad", "fearful", "disgusted", "surprised", "neutral"]] = None
|
435
438
|
|
436
439
|
speed: Optional[float] = None
|
437
440
|
|
meutils/apis/jimeng/doubao.py
DELETED
@@ -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())
|
File without changes
|
File without changes
|
{MeUtils-2025.5.15.14.3.22.dist-info → MeUtils-2025.5.29.18.12.8.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|