MeUtils 2025.3.23.13.35.22__py3-none-any.whl → 2025.3.31.19.40.39__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.3.23.13.35.22.dist-info → MeUtils-2025.3.31.19.40.39.dist-info}/METADATA +263 -263
- {MeUtils-2025.3.23.13.35.22.dist-info → MeUtils-2025.3.31.19.40.39.dist-info}/RECORD +34 -31
- examples/_openaisdk/openai_google.py +114 -0
- meutils/apis/common.py +12 -10
- meutils/apis/dashscope/__init__.py +11 -0
- meutils/apis/dashscope/audio.py +37 -0
- meutils/apis/images/recraft.py +11 -6
- meutils/apis/jina/common.py +3 -2
- meutils/apis/siliconflow/videos.py +40 -21
- meutils/apis/textin_apis/common.py +5 -3
- meutils/caches/common.py +1 -2
- meutils/data/VERSION +1 -1
- meutils/data/oneapi/NOTICE.html +4 -1
- meutils/io/files_utils.py +4 -2
- meutils/io/openai_files.py +4 -4
- meutils/io/x.py +12 -58
- meutils/llm/check_utils.py +2 -2
- meutils/llm/clients.py +1 -4
- meutils/llm/completions/chat_gemini.py +2 -2
- meutils/llm/completions/chat_plus.py +24 -11
- meutils/llm/completions/chat_spark.py +4 -2
- meutils/llm/completions/deep2x.py +16 -6
- meutils/llm/completions/qwenllm.py +37 -35
- meutils/llm/completions/yuanbao.py +12 -6
- meutils/notice/feishu.py +3 -0
- meutils/request_utils/crawler.py +3 -2
- meutils/schemas/image_types.py +1 -5
- meutils/schemas/oneapi/common.py +49 -8
- meutils/schemas/siliconflow_types.py +24 -2
- meutils/serving/fastapi/exceptions/http_error.py +29 -9
- {MeUtils-2025.3.23.13.35.22.dist-info → MeUtils-2025.3.31.19.40.39.dist-info}/LICENSE +0 -0
- {MeUtils-2025.3.23.13.35.22.dist-info → MeUtils-2025.3.31.19.40.39.dist-info}/WHEEL +0 -0
- {MeUtils-2025.3.23.13.35.22.dist-info → MeUtils-2025.3.31.19.40.39.dist-info}/entry_points.txt +0 -0
- {MeUtils-2025.3.23.13.35.22.dist-info → MeUtils-2025.3.31.19.40.39.dist-info}/top_level.txt +0 -0
meutils/schemas/oneapi/common.py
CHANGED
@@ -20,13 +20,15 @@ MINIMAX_VIDEO = 3
|
|
20
20
|
|
21
21
|
MODEL_PRICE = {
|
22
22
|
"o1:free": FREE,
|
23
|
+
# "claude-3-7-sonnet-code:free": "claude-3-7-sonnet-code"
|
24
|
+
"claude-3-7-sonnet-code:free": 0.0001,
|
23
25
|
|
24
26
|
"black-forest-labs/FLUX.1-dev": 0.0001,
|
25
27
|
"black-forest-labs/FLUX.1-pro": 0.0001,
|
26
28
|
|
27
29
|
"images": FREE,
|
28
30
|
# rix
|
29
|
-
"kling_image": 0.
|
31
|
+
"kling_image": 0.05,
|
30
32
|
"kling_virtual_try_on": 1,
|
31
33
|
"kling_effects": 1,
|
32
34
|
|
@@ -66,6 +68,10 @@ MODEL_PRICE = {
|
|
66
68
|
"sora-1:1-480p-5s": 1.2,
|
67
69
|
"dall-e-3": 0.03,
|
68
70
|
|
71
|
+
# 智能体
|
72
|
+
"ppt": 0.1,
|
73
|
+
"ppt-islide": 0.1,
|
74
|
+
|
69
75
|
# 虚拟换衣fish
|
70
76
|
"api-kolors-virtual-try-on": 0.1,
|
71
77
|
"official-api-kolors-virtual-try-on": 0.8,
|
@@ -242,6 +248,7 @@ MODEL_PRICE = {
|
|
242
248
|
|
243
249
|
"gpt-4-all": 0.1,
|
244
250
|
"gpt-4o-all": 0.1,
|
251
|
+
"gpt-4o-image": 0.06,
|
245
252
|
|
246
253
|
"gpt-4-gizmo-*": 0.1,
|
247
254
|
"advanced-voice": 1,
|
@@ -377,6 +384,7 @@ MODEL_RATIO = {
|
|
377
384
|
"grok-3": 2,
|
378
385
|
"grok-3-deepsearch": 2,
|
379
386
|
"grok-3-reasoner": 2,
|
387
|
+
"grok-3-deepersearch": 2,
|
380
388
|
|
381
389
|
# 定制
|
382
390
|
"lingxi-all": 1,
|
@@ -420,6 +428,10 @@ MODEL_RATIO = {
|
|
420
428
|
"qwen-vl-max-latest": 1.5,
|
421
429
|
"qwen-vl-plus-latest": 0.75,
|
422
430
|
|
431
|
+
"qwen2.5-vl-7b-instruct": 0.15,
|
432
|
+
"qwen2.5-vl-32b-instruct": 0.5,
|
433
|
+
"qwen2.5-vl-72b-instruct": 1.5,
|
434
|
+
|
423
435
|
"qwen2.5-coder-7b-instruct": 0.05,
|
424
436
|
"qwen2.5-7b-instruct": 0.05,
|
425
437
|
"qwen2.5-14b-instruct": 0.25,
|
@@ -429,12 +441,13 @@ MODEL_RATIO = {
|
|
429
441
|
"qwen2.5-coder-32b-instruct": 0.5,
|
430
442
|
|
431
443
|
"qwq-32b": 1,
|
432
|
-
"qwq-
|
444
|
+
"qwq-plus": 0.8,
|
445
|
+
"qwq-max": 0.8,
|
433
446
|
"qwq-max-search": 2,
|
434
447
|
"qwen-max-search": 2,
|
435
448
|
|
436
449
|
"qvq-72b-preview": 2,
|
437
|
-
"
|
450
|
+
"qvq-max-2025-03-25": 4,
|
438
451
|
|
439
452
|
"qwen1.5-7b-chat": 0.05, # 特价
|
440
453
|
"qwen1.5-14b-chat": 0.7,
|
@@ -498,9 +511,11 @@ MODEL_RATIO = {
|
|
498
511
|
|
499
512
|
# deepseek
|
500
513
|
"deepseek-v3": 1,
|
514
|
+
"deepseek-v3-0324": 1,
|
501
515
|
"deepseek-v3-8k": 0.5,
|
502
516
|
"deepseek-v3-128k": 5,
|
503
517
|
"deepseek-chat": 1,
|
518
|
+
|
504
519
|
"deepseek-chat-8k": 0.5,
|
505
520
|
"deepseek-chat-64k": 5,
|
506
521
|
"deepseek-chat-164k": 5,
|
@@ -517,8 +532,10 @@ MODEL_RATIO = {
|
|
517
532
|
'deepseek-r1-search': 2,
|
518
533
|
'deepseek-reasoner-search': 2,
|
519
534
|
|
520
|
-
'deepseek-r1-think':
|
521
|
-
'deepseek-reasoner-think':
|
535
|
+
'deepseek-r1-think': 2,
|
536
|
+
'deepseek-reasoner-think': 2,
|
537
|
+
|
538
|
+
"deepseek-r1-plus": 2,
|
522
539
|
|
523
540
|
# deepseek-r1:1.5b,deepseek-r1-distill-qwen-1.5b,deepseek-r1:7b,deepseek-r1-distill-qwen-7b,deepseek-r1:8b,deepseek-r1-distill-llama-8b,deepseek-r1:14b,deepseek-r1-distill-qwen-14b,deepseek-r1:32b,deepseek-r1-distill-qwen-32b,deepseek-r1:70b,deepseek-r1-distill-llama-70b
|
524
541
|
"deepseek-r1:1.5b": 0.1,
|
@@ -594,8 +611,9 @@ MODEL_RATIO = {
|
|
594
611
|
"text-babbage-001": 0.25,
|
595
612
|
"text-davinci-edit-001": 10,
|
596
613
|
|
614
|
+
"omni-moderation-latest": 0.1,
|
597
615
|
"text-moderation-latest": 0.1,
|
598
|
-
|
616
|
+
|
599
617
|
"tts-1": 7.5,
|
600
618
|
"tts-1-1106": 7.5,
|
601
619
|
"tts-1-hd": 15,
|
@@ -618,6 +636,12 @@ MODEL_RATIO = {
|
|
618
636
|
"claude-3-7-sonnet-latest": 1.5,
|
619
637
|
"claude-3-7-sonnet-20250219": 1.5,
|
620
638
|
|
639
|
+
"deepclaude": 1.5,
|
640
|
+
"deep-claude": 1.5,
|
641
|
+
|
642
|
+
"deep-gemini": 1.5,
|
643
|
+
"deep-grok": 1.5,
|
644
|
+
|
621
645
|
"command": 0.5 * 2,
|
622
646
|
"command-light": 0.5 * 2,
|
623
647
|
"command-light-nightly": 0.5 * 2,
|
@@ -655,6 +679,7 @@ MODEL_RATIO = {
|
|
655
679
|
|
656
680
|
"gemini-2.0-pro": 1.25,
|
657
681
|
"gemini-2.0-pro-exp-02-05": 1.25,
|
682
|
+
"gemini-2.5-pro-exp-03-25": 1.5,
|
658
683
|
|
659
684
|
"gemini-2.0-flash-thinking-exp": 1,
|
660
685
|
"gemini-2.0-flash-thinking-exp-1219": 1,
|
@@ -783,6 +808,7 @@ COMPLETION_RATIO = {
|
|
783
808
|
"grok-3": 5,
|
784
809
|
"grok-3-deepsearch": 5,
|
785
810
|
"grok-3-reasoner": 5,
|
811
|
+
"grok-3-deepersearch": 5,
|
786
812
|
|
787
813
|
"claude-3-5-haiku-20241022": 5,
|
788
814
|
"anthropic/claude-3-5-haiku-20241022:beta": 5,
|
@@ -863,6 +889,7 @@ COMPLETION_RATIO = {
|
|
863
889
|
|
864
890
|
"gemini-2.0-pro": 5,
|
865
891
|
"gemini-2.0-pro-exp-02-05": 5,
|
892
|
+
"gemini-2.5-pro-exp-03-25": 5,
|
866
893
|
|
867
894
|
"gemma2-9b-it": 4,
|
868
895
|
"gemma2-27b-it": 4,
|
@@ -883,6 +910,11 @@ COMPLETION_RATIO = {
|
|
883
910
|
"qwen-max": 4,
|
884
911
|
"qwen-vl-max-latest": 3,
|
885
912
|
"qwen-vl-plus-latest": 3,
|
913
|
+
|
914
|
+
"qwen2.5-vl-7b-instruct": 4,
|
915
|
+
"qwen2.5-vl-32b-instruct": 4,
|
916
|
+
"qwen2.5-vl-72b-instruct": 4,
|
917
|
+
|
886
918
|
"qwen2-vl-7b-instruct": 5,
|
887
919
|
"qwen2-vl-72b-instruct": 5,
|
888
920
|
"qwen-max-latest": 4,
|
@@ -891,16 +923,17 @@ COMPLETION_RATIO = {
|
|
891
923
|
|
892
924
|
"qwen-plus": 2.5,
|
893
925
|
|
894
|
-
"qwq-
|
926
|
+
"qwq-plus": 2.5,
|
927
|
+
"qwq-max": 2.5,
|
895
928
|
"qwq-max-search": 4,
|
896
929
|
"qwen-max-search": 4,
|
930
|
+
"qvq-max-2025-03-25": 4,
|
897
931
|
|
898
932
|
"qwen2.5-7b-instruct": 4,
|
899
933
|
"qwen2.5-14b-instruct": 4,
|
900
934
|
"qwen2.5-32b-instruct": 4,
|
901
935
|
"qwen2.5-72b-instruct": 4,
|
902
936
|
"qwen2.5-math-72b-instruct": 4,
|
903
|
-
"qwen2.5-vl-72b-instruct": 3,
|
904
937
|
|
905
938
|
"deepseek-vl2": 4,
|
906
939
|
"deepseek-ai/deepseek-vl2": 4,
|
@@ -944,7 +977,9 @@ COMPLETION_RATIO = {
|
|
944
977
|
"meta-deepresearch": 4,
|
945
978
|
|
946
979
|
"deepseek-v3": 4,
|
980
|
+
"deepseek-v3-0324": 4,
|
947
981
|
"deepseek-chat": 4,
|
982
|
+
|
948
983
|
'deepseek-r1': 4,
|
949
984
|
'deepseek-reasoner': 4,
|
950
985
|
"deepseek-reasoner-164k": 8,
|
@@ -964,6 +999,12 @@ COMPLETION_RATIO = {
|
|
964
999
|
'deepseek-r1-search': 5,
|
965
1000
|
'deepseek-reasoner-search': 5,
|
966
1001
|
|
1002
|
+
"deepseek-r1-plus": 4,
|
1003
|
+
"deepclaude": 4,
|
1004
|
+
"deep-claude": 4,
|
1005
|
+
"deep-gemini": 4,
|
1006
|
+
"deep-grok": 4,
|
1007
|
+
|
967
1008
|
"glm-zero": 5,
|
968
1009
|
"glm-zero-preview": 5,
|
969
1010
|
"glm-4v-flash": 5,
|
@@ -11,6 +11,9 @@
|
|
11
11
|
|
12
12
|
from meutils.pipe import *
|
13
13
|
|
14
|
+
FEISHU_URL = "https://xchatllm.feishu.cn/sheets/Bmjtst2f6hfMqFttbhLcdfRJnNf?sheet=3aA5dH"
|
15
|
+
FEISHU_URL_FREE = "https://xchatllm.feishu.cn/sheets/Bmjtst2f6hfMqFttbhLcdfRJnNf?sheet=xlvlrH"
|
16
|
+
|
14
17
|
BASE_URL = "https://api.siliconflow.cn/v1"
|
15
18
|
|
16
19
|
EXAMPLES = [
|
@@ -72,9 +75,28 @@ class RerankRequest(BaseModel):
|
|
72
75
|
|
73
76
|
class VideoRequest(BaseModel):
|
74
77
|
model: str
|
78
|
+
|
75
79
|
prompt: str
|
76
|
-
|
80
|
+
negative_prompt: Optional[str] = None
|
81
|
+
|
82
|
+
image: Optional[str] = None # 图生视频
|
83
|
+
|
77
84
|
seed: Optional[int] = None
|
78
85
|
|
86
|
+
# response_format: Optional[str] = None # "mp4" fal
|
87
|
+
|
79
88
|
class Config:
|
80
|
-
|
89
|
+
extra = "allow"
|
90
|
+
|
91
|
+
# frozen = True
|
92
|
+
# populate_by_name = True
|
93
|
+
|
94
|
+
json_schema_extra = {
|
95
|
+
"examples": [
|
96
|
+
{
|
97
|
+
"model": "Wan-AI/Wan2.1-I2V-14B-720P-Turbo",
|
98
|
+
"prompt": "画条狗",
|
99
|
+
"image": "https://oss.ffire.cc/files/kling_watermark.png"
|
100
|
+
},
|
101
|
+
]
|
102
|
+
}
|
@@ -10,13 +10,7 @@ from starlette.responses import JSONResponse
|
|
10
10
|
|
11
11
|
from fastapi.exceptions import RequestValidationError, HTTPException
|
12
12
|
|
13
|
-
from meutils.notice.feishu import
|
14
|
-
|
15
|
-
send_message = partial(
|
16
|
-
_send_message,
|
17
|
-
title=__name__,
|
18
|
-
url="https://open.feishu.cn/open-apis/bot/v2/hook/d1c7b67d-b0f8-4067-a2f5-109f20eeb696"
|
19
|
-
)
|
13
|
+
from meutils.notice.feishu import send_message_for_httpexception as send_message
|
20
14
|
|
21
15
|
|
22
16
|
async def http_error_handler(_: Request, exc: HTTPException) -> JSONResponse:
|
@@ -42,7 +36,6 @@ async def general_exception_handler(request: Request, exc: Exception):
|
|
42
36
|
|
43
37
|
|
44
38
|
async def chatfire_api_exception_handler(request: Request, exc: Exception):
|
45
|
-
|
46
39
|
content = {
|
47
40
|
"error":
|
48
41
|
{
|
@@ -68,10 +61,37 @@ async def chatfire_api_exception_handler(request: Request, exc: Exception):
|
|
68
61
|
|
69
62
|
# send_message
|
70
63
|
content_detail = f"{traceback.format_exc()}"
|
64
|
+
#
|
65
|
+
# from meutils.pipe import logger
|
66
|
+
# logger.debug(content_detail)
|
67
|
+
|
71
68
|
if any(code in content_detail for code in {'451', }):
|
72
69
|
content_detail = ""
|
73
70
|
|
74
|
-
send_message([content, content_detail])
|
71
|
+
send_message([content, content_detail], title=__name__)
|
72
|
+
|
73
|
+
# from meutils.pipe import logger
|
74
|
+
#
|
75
|
+
# try:
|
76
|
+
#
|
77
|
+
# logger.debug(request.headers)
|
78
|
+
# logger.debug(request.url)
|
79
|
+
# logger.debug(request.method)
|
80
|
+
# logger.debug(request.query_params._dict)
|
81
|
+
#
|
82
|
+
# logger.debug(request.client)
|
83
|
+
# logger.debug(request.cookies)
|
84
|
+
#
|
85
|
+
# payload = await request.body()
|
86
|
+
#
|
87
|
+
# # send_message(payload, title=__name__)
|
88
|
+
#
|
89
|
+
# logger.debug(payload)
|
90
|
+
# logger.debug(payload)
|
91
|
+
#
|
92
|
+
#
|
93
|
+
# except Exception as e:
|
94
|
+
# logger.debug(e)
|
75
95
|
|
76
96
|
return reps or JSONResponse(
|
77
97
|
content=content,
|
File without changes
|
File without changes
|
{MeUtils-2025.3.23.13.35.22.dist-info → MeUtils-2025.3.31.19.40.39.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|