MeUtils 2025.2.6.19.49.50__py3-none-any.whl → 2025.2.6.20.41.23__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.2.6.19.49.50.dist-info → MeUtils-2025.2.6.20.41.23.dist-info}/METADATA +29 -29
- {MeUtils-2025.2.6.19.49.50.dist-info → MeUtils-2025.2.6.20.41.23.dist-info}/RECORD +11 -11
- examples/_openaisdk/openai_chatfire.py +6 -4
- meutils/data/VERSION +1 -1
- meutils/llm/completions/reasoner.py +15 -11
- meutils/llm/openai_utils/common.py +3 -2
- meutils/schemas/oneapi/common.py +8 -7
- {MeUtils-2025.2.6.19.49.50.dist-info → MeUtils-2025.2.6.20.41.23.dist-info}/LICENSE +0 -0
- {MeUtils-2025.2.6.19.49.50.dist-info → MeUtils-2025.2.6.20.41.23.dist-info}/WHEEL +0 -0
- {MeUtils-2025.2.6.19.49.50.dist-info → MeUtils-2025.2.6.20.41.23.dist-info}/entry_points.txt +0 -0
- {MeUtils-2025.2.6.19.49.50.dist-info → MeUtils-2025.2.6.20.41.23.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: MeUtils
|
3
|
-
Version: 2025.2.6.
|
3
|
+
Version: 2025.2.6.20.41.23
|
4
4
|
Summary: description
|
5
5
|
Home-page: https://github.com/yuanjie-ai/MeUtils
|
6
6
|
Author: yuanjie
|
@@ -64,41 +64,41 @@ Requires-Dist: sse-starlette ; extra == 'ai'
|
|
64
64
|
Requires-Dist: openai ; extra == 'ai'
|
65
65
|
Requires-Dist: langchain ; extra == 'ai'
|
66
66
|
Provides-Extra: all
|
67
|
-
Requires-Dist:
|
68
|
-
Requires-Dist:
|
67
|
+
Requires-Dist: seaborn ; extra == 'all'
|
68
|
+
Requires-Dist: pretty-errors ; extra == 'all'
|
69
|
+
Requires-Dist: jinja2 ; extra == 'all'
|
70
|
+
Requires-Dist: thriftpy2 ; extra == 'all'
|
71
|
+
Requires-Dist: missingno ; extra == 'all'
|
72
|
+
Requires-Dist: filetype ; extra == 'all'
|
73
|
+
Requires-Dist: iteration-utilities ; extra == 'all'
|
69
74
|
Requires-Dist: openai ; extra == 'all'
|
70
75
|
Requires-Dist: sqlalchemy ; extra == 'all'
|
71
|
-
Requires-Dist: pymupd ; extra == 'all'
|
72
|
-
Requires-Dist: pandas-profiling[notebook] ; extra == 'all'
|
73
|
-
Requires-Dist: reportlab ; extra == 'all'
|
74
|
-
Requires-Dist: missingno ; extra == 'all'
|
75
|
-
Requires-Dist: jieba ; extra == 'all'
|
76
|
-
Requires-Dist: cachetools ; extra == 'all'
|
77
|
-
Requires-Dist: thriftpy2 ; extra == 'all'
|
78
76
|
Requires-Dist: thefuck ; extra == 'all'
|
79
|
-
Requires-Dist:
|
80
|
-
Requires-Dist:
|
77
|
+
Requires-Dist: cachetools ; extra == 'all'
|
78
|
+
Requires-Dist: schedule ; extra == 'all'
|
79
|
+
Requires-Dist: pyarrow ; extra == 'all'
|
80
|
+
Requires-Dist: polars ; extra == 'all'
|
81
|
+
Requires-Dist: fastapi ; extra == 'all'
|
82
|
+
Requires-Dist: pymysql ; extra == 'all'
|
83
|
+
Requires-Dist: sse-starlette ; extra == 'all'
|
81
84
|
Requires-Dist: uvicorn ; extra == 'all'
|
82
|
-
Requires-Dist:
|
83
|
-
Requires-Dist:
|
84
|
-
Requires-Dist: pymilvus ; extra == 'all'
|
85
|
-
Requires-Dist: jinja2 ; extra == 'all'
|
86
|
-
Requires-Dist: streamlit ; extra == 'all'
|
87
|
-
Requires-Dist: seaborn ; extra == 'all'
|
88
|
-
Requires-Dist: pandas-summary ; extra == 'all'
|
85
|
+
Requires-Dist: pandas-profiling[notebook] ; extra == 'all'
|
86
|
+
Requires-Dist: gunicorn ; extra == 'all'
|
89
87
|
Requires-Dist: geopy ; extra == 'all'
|
90
|
-
Requires-Dist:
|
88
|
+
Requires-Dist: faiss-cpu ; extra == 'all'
|
91
89
|
Requires-Dist: fastapi[all] ; extra == 'all'
|
92
|
-
Requires-Dist:
|
93
|
-
Requires-Dist: filetype ; extra == 'all'
|
94
|
-
Requires-Dist: sse-starlette ; extra == 'all'
|
90
|
+
Requires-Dist: streamlit ; extra == 'all'
|
95
91
|
Requires-Dist: redis-py-cluster ; extra == 'all'
|
96
|
-
Requires-Dist:
|
97
|
-
Requires-Dist:
|
98
|
-
Requires-Dist:
|
99
|
-
Requires-Dist:
|
100
|
-
Requires-Dist:
|
101
|
-
Requires-Dist:
|
92
|
+
Requires-Dist: pymilvus ; extra == 'all'
|
93
|
+
Requires-Dist: asyncmy ; extra == 'all'
|
94
|
+
Requires-Dist: pymupd ; extra == 'all'
|
95
|
+
Requires-Dist: dataframe-image ; extra == 'all'
|
96
|
+
Requires-Dist: jieba ; extra == 'all'
|
97
|
+
Requires-Dist: langchain ; extra == 'all'
|
98
|
+
Requires-Dist: pandas-summary ; extra == 'all'
|
99
|
+
Requires-Dist: simplejson ; extra == 'all'
|
100
|
+
Requires-Dist: reportlab ; extra == 'all'
|
101
|
+
Requires-Dist: pymongo ; extra == 'all'
|
102
102
|
Provides-Extra: ann
|
103
103
|
Requires-Dist: pymilvus ; extra == 'ann'
|
104
104
|
Requires-Dist: faiss-cpu ; extra == 'ann'
|
@@ -94,7 +94,7 @@ examples/_openaisdk/openai_audio.py,sha256=ZyYslH9RfdJBpNUpjKn_5x0d94_H291Qt31u_
|
|
94
94
|
examples/_openaisdk/openai_baichuan.py,sha256=-xhHovkFmWOTX25CJjIon0my-ocmwfAZJu1C0eS80Xs,1614
|
95
95
|
examples/_openaisdk/openai_baidu.py,sha256=qnrxP66lY7Qf2jEbFEHrt0FrR5_Aji1AgwSI_46IabY,1969
|
96
96
|
examples/_openaisdk/openai_cache.py,sha256=89GbJ1QlqQbVxlUeuFgEbwDYHOkum7BK0zB-CqmDAZU,726
|
97
|
-
examples/_openaisdk/openai_chatfire.py,sha256=
|
97
|
+
examples/_openaisdk/openai_chatfire.py,sha256=LlJnt5_Z6NgOjbpneO3wNfRfFuIGRTUPCZ_BbexuHc0,18528
|
98
98
|
examples/_openaisdk/openai_chatfire_all.py,sha256=DaiI1NfDeK655QvXyczkgXK9Awxp7NBe71LHA7trxGE,4831
|
99
99
|
examples/_openaisdk/openai_dashscope.py,sha256=m9SjQpaNgYwr4Qd3XusWbJBGp5ZTtpuB40QopejxPKQ,1029
|
100
100
|
examples/_openaisdk/openai_deepinfra.py,sha256=innI4BT15dZEqheqDHG4lHDczY1QC7t2Whcavi1pcz0,1195
|
@@ -518,7 +518,7 @@ meutils/config_utils/lark_utils/demo.py,sha256=3g0Fs7oLaeW75T60gYWMLgyNg1OnfOjfH
|
|
518
518
|
meutils/config_utils/lark_utils/x.py,sha256=MlMQGhehP9xMEgetxVCX68XFaosfKoW1JA5cZ3JqN2w,1857
|
519
519
|
meutils/crawlers/__init__.py,sha256=TBU4xA-IOsHV-0yIkW7YXxn_QT7TT8NncqxO7IykEfs,271
|
520
520
|
meutils/data/SimHei.ttf,sha256=-XEnekS5yHP_URkT4XBI2w22ylV-KxudhkeIYFbrILA,10062565
|
521
|
-
meutils/data/VERSION,sha256
|
521
|
+
meutils/data/VERSION,sha256=gMmj5o_6WTKGJH8XgEaOUaTkPis38nxBlANaFkOYhkI,19
|
522
522
|
meutils/data/_FLAG,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
523
523
|
meutils/data/_SUCCESS,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
524
524
|
meutils/data/__init__.py,sha256=Hfwkkxs4zHqKhxht0YrhS566a9P5axtmgNvM5wF8ceQ,243
|
@@ -585,7 +585,7 @@ meutils/llm/completions/modelscope.py,sha256=umPlJuHSL2RR0oNdTIAqts8iqEmGp_MR6Vh
|
|
585
585
|
meutils/llm/completions/oi.py,sha256=DmvzxJfdLA_I3MWcULhFtiUdo90j7V2dLvYvmZ-Tm9U,293
|
586
586
|
meutils/llm/completions/qwenllm.py,sha256=d3E51-iKSCuL2HrVO4aUmGN_fa5Jwz5K1ENbK7MtXEE,2043
|
587
587
|
meutils/llm/completions/rag.py,sha256=cpQ1aZX2QI1QDfFpODTxWHPYglK6_3qrlUM_KHLBNhc,1112
|
588
|
-
meutils/llm/completions/reasoner.py,sha256=
|
588
|
+
meutils/llm/completions/reasoner.py,sha256=IUwIM-B74iH_WUgGv1_y3qabtSi2EBWGO3YOsTmT3jo,5469
|
589
589
|
meutils/llm/completions/tryblend.py,sha256=NfVRktn1QiE2k60PzEI-LmKuxZCc7mtL_KlsrVcZg4k,8957
|
590
590
|
meutils/llm/completions/tune.py,sha256=FypfUgsB34t-E9xI6WydJYEk_-phscrLOX1iUCeKb_E,10138
|
591
591
|
meutils/llm/completions/x.py,sha256=XE8aCyuhkpYq0nho1mq9lAdRU1yOPc8BpvCpNYYMYqM,630
|
@@ -600,7 +600,7 @@ meutils/llm/completions/rag/qwen.py,sha256=1dBNLLbQDRsM-7EGaStcWFU8HRa-rp3RxJ9cp
|
|
600
600
|
meutils/llm/completions/rag/rag.py,sha256=mnC4bZUMuNYuPFXMBqXMofj_ms8uP5MMw1leJ5jXA_k,1209
|
601
601
|
meutils/llm/functions/__init__.py,sha256=It6pcNwRBSh3Em45ooi61lc5tFg8eOYv0BvEFuRjSGQ,271
|
602
602
|
meutils/llm/openai_utils/__init__.py,sha256=MWyNhP2K49oaHGEZlInZc3XlwqlStFultP8k7HDPAwk,290
|
603
|
-
meutils/llm/openai_utils/common.py,sha256=
|
603
|
+
meutils/llm/openai_utils/common.py,sha256=XQNFzu6GkKozjRinsaTh755zoRpjsWYL5BK4q3gj8jw,9525
|
604
604
|
meutils/llm/openai_utils/tool_outputs.py,sha256=6mNkm4btgy0uzF98gdmcah1bYmoflXdLz2Sqm0KC_LQ,1224
|
605
605
|
meutils/llm/output_parsers/__init__.py,sha256=EGKvgUD47ReyV5Z9RXDCrdDLgfKMHdoayzsXVmBuQxw,3474
|
606
606
|
meutils/llm/prompts/__init__.py,sha256=VlEEViFoUSRS0EF1rHJXHh9Ik9FpvAiR1luKjHOsUc4,8580
|
@@ -744,7 +744,7 @@ meutils/schemas/db/__init__.py,sha256=m1maURVoM6dIW0yt6ELZrZTzULtkHybVOSXtHNJRVI
|
|
744
744
|
meutils/schemas/db/oneapi_types.py,sha256=YanT0q9pU7dva2ZBPWjCpwGNUuifnJh0zUJJCQ9070c,3848
|
745
745
|
meutils/schemas/oneapi/__init__.py,sha256=uevbi3QAvFzN9WPbx9bYKTDyKt7P2ueZO6W0nSiD0sk,289
|
746
746
|
meutils/schemas/oneapi/_types.py,sha256=ClvAaNy3SahEN8lL8KEErHTD6HANelXUeKc_3iLfosQ,1488
|
747
|
-
meutils/schemas/oneapi/common.py,sha256=
|
747
|
+
meutils/schemas/oneapi/common.py,sha256=mePimgYAll7TAI9d044BQ1jX-xOsdO9_iPMInUHwpCg,27747
|
748
748
|
meutils/schemas/oneapi/icons.py,sha256=T7W5gInBJoHe62wzMimbG_UI-wn3_-rmQ1O4O2z-CQY,1089
|
749
749
|
meutils/schemas/oneapi/model_group_info.py,sha256=rGtflYJuFIjk5MsVEvK9JUR4IciX8jfErqeLqf8DIlQ,1586
|
750
750
|
meutils/schemas/oneapi/model_info.py,sha256=_uwKEPIIqm7ZYfhmpxtXB2QNsS83SpJY-OaBzvogC9w,772
|
@@ -872,9 +872,9 @@ meutils/tools/seize.py,sha256=nOKAS63w-Lbi48I0m2MPhdsokUTwxco0laPxYVmW4Mw,1064
|
|
872
872
|
meutils/tools/service_monitor.py,sha256=ibsLtBN2g2DL7ZnLJ8vhiZOiOcqTAyx711djDdBK-3M,1255
|
873
873
|
meutils/tools/sys_monitor.py,sha256=6MoyzrItqDUOSjfHcMJmMofQkEPTW36CT_aKui0rg84,429
|
874
874
|
meutils/tools/token_monitor.py,sha256=Np-YK-R4P4IPAXyZvMxwvXI4sFmNJQAQK1lSegNaYpA,997
|
875
|
-
MeUtils-2025.2.6.
|
876
|
-
MeUtils-2025.2.6.
|
877
|
-
MeUtils-2025.2.6.
|
878
|
-
MeUtils-2025.2.6.
|
879
|
-
MeUtils-2025.2.6.
|
880
|
-
MeUtils-2025.2.6.
|
875
|
+
MeUtils-2025.2.6.20.41.23.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
876
|
+
MeUtils-2025.2.6.20.41.23.dist-info/METADATA,sha256=2hhfEzGEv6L9m2YB36RLjEWfZpVf0ezXPxbGsf4GQwQ,6142
|
877
|
+
MeUtils-2025.2.6.20.41.23.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
878
|
+
MeUtils-2025.2.6.20.41.23.dist-info/entry_points.txt,sha256=lufZlBHRqqZKdY-ZQJ4CSZb0qhV5hQC37egZna9M7ug,357
|
879
|
+
MeUtils-2025.2.6.20.41.23.dist-info/top_level.txt,sha256=cInfxMmkgNOskurdjwP5unau4rA7Uw48nu07tYhS7KY,22
|
880
|
+
MeUtils-2025.2.6.20.41.23.dist-info/RECORD,,
|
@@ -227,14 +227,14 @@ if __name__ == '__main__':
|
|
227
227
|
# "deepseek-r1:1.5b"
|
228
228
|
# "deepseek-v3-128k",
|
229
229
|
# "qwen2.5-32b-instruct"
|
230
|
-
"deepseek-r1:1.5b"
|
230
|
+
# "deepseek-r1:1.5b"
|
231
231
|
# "deepseek-r1:1.5b"
|
232
232
|
|
233
|
-
|
233
|
+
"deepseek-r1",
|
234
234
|
# "deepseek-v3"
|
235
235
|
|
236
236
|
]
|
237
|
-
check_models(models, api_key=os.getenv("OPENAI_API_KEY"))
|
237
|
+
# check_models(models, api_key=os.getenv("OPENAI_API_KEY"))
|
238
238
|
# check_models(models, api_key=os.getenv("OPENAI_API_KEY_OPENAI"))
|
239
239
|
# check_models(models, api_key=os.getenv("OPENAI_API_KEY"))
|
240
240
|
# check_models(models, api_key=os.getenv("OPENAI_API_KEY_35"))
|
@@ -249,4 +249,6 @@ if __name__ == '__main__':
|
|
249
249
|
# for i in range(5):
|
250
250
|
# check_models(models, api_key=os.getenv("OPENAI_API_KEY_GUOCHAN") + "-302")
|
251
251
|
|
252
|
-
# check_models(models, api_key=os.getenv("OPENAI_API_KEY_GUOCHAN") + "-725")
|
252
|
+
# check_models(models, api_key=os.getenv("OPENAI_API_KEY_GUOCHAN") + "-725")
|
253
|
+
|
254
|
+
check_models(models, api_key=os.getenv("OPENAI_API_KEY_GUOCHAN") + "-722")
|
meutils/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2025.02.06.
|
1
|
+
2025.02.06.20.41.23
|
@@ -10,7 +10,7 @@
|
|
10
10
|
"""
|
11
11
|
1. 适配任意客户端 think标识输出
|
12
12
|
2. 开源标准化
|
13
|
-
|
13
|
+
todo: 对齐官网格式
|
14
14
|
"""
|
15
15
|
|
16
16
|
from openai import AsyncOpenAI
|
@@ -88,7 +88,7 @@ class Completions(object):
|
|
88
88
|
is_reasoning_content = False
|
89
89
|
message.content = ""
|
90
90
|
|
91
|
-
logger.debug(message)
|
91
|
+
# logger.debug(message)
|
92
92
|
|
93
93
|
if self.reasoning_stream: # 适配任意客户端: 展示推理内容
|
94
94
|
|
@@ -137,25 +137,29 @@ if __name__ == '__main__':
|
|
137
137
|
# model="qwen-plus-latest",
|
138
138
|
|
139
139
|
# model="deepseek-r1:1.5b",
|
140
|
-
model="deepseek-r1:32b",
|
141
|
-
|
142
|
-
|
140
|
+
# model="deepseek-r1:32b",
|
141
|
+
#
|
142
|
+
model="deepseek-r1",
|
143
|
+
# model
|
143
144
|
|
144
145
|
messages=[
|
145
146
|
# {
|
146
147
|
# 'role': 'system',
|
147
148
|
# 'content': '深度思考之后在回答问题并给出详细的理由'
|
148
149
|
# },
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
150
|
+
{
|
151
|
+
'role': 'system',
|
152
|
+
'content': '你是个AI助手,请务必在深度思考之后,再回答用户问题'
|
153
|
+
},
|
153
154
|
{
|
154
155
|
'role': 'user',
|
155
156
|
'content': '你好'
|
156
157
|
},
|
157
158
|
|
158
159
|
],
|
159
|
-
stream=
|
160
|
+
stream=True,
|
160
161
|
)
|
161
|
-
arun(Completions(
|
162
|
+
arun(Completions(
|
163
|
+
base_url="https://ai.gitee.com/v1",
|
164
|
+
api_key="AHKZ65ARNFH8QGMUUVCPECDTZVOLRPUXIKPGAC1Y",
|
165
|
+
).create(request))
|
@@ -207,7 +207,7 @@ async def create_chat_completion_chunk(
|
|
207
207
|
# logger.debug(type(completion_chunks))
|
208
208
|
|
209
209
|
chat_completion_chunk.id = chat_id or f"chatcmpl-{shortuuid.random()}"
|
210
|
-
chat_completion_chunk_stop.id = chat_completion_chunk.id
|
210
|
+
chat_completion_chunk_stop.id = chat_completion_chunk.id ######## todo
|
211
211
|
async for completion_chunk in achain(completion_chunks):
|
212
212
|
|
213
213
|
# logger.debug(completion_chunk)
|
@@ -218,6 +218,7 @@ async def create_chat_completion_chunk(
|
|
218
218
|
yield chat_completion_chunk.model_dump_json()
|
219
219
|
else: # todo: AttributeError: 'tuple' object has no attribute 'model'
|
220
220
|
try:
|
221
|
+
chat_completion_chunk_stop.id = chat_completion_chunk.id
|
221
222
|
completion_chunk.model = redirect_model or completion_chunk.model
|
222
223
|
chat_completion_chunk_stop.usage = completion_chunk.usage ############## 需要判断 usage?
|
223
224
|
yield completion_chunk.model_dump_json()
|
@@ -283,4 +284,4 @@ if __name__ == '__main__':
|
|
283
284
|
|
284
285
|
# to_openai_params(ChatCompletionRequest())
|
285
286
|
|
286
|
-
print(token_encoder.encode('hi'))
|
287
|
+
print(token_encoder.encode('hi'))
|
meutils/schemas/oneapi/common.py
CHANGED
@@ -382,7 +382,8 @@ MODEL_RATIO = {
|
|
382
382
|
"qwen-max": 10,
|
383
383
|
"qwen-max-longcontext": 20,
|
384
384
|
"qwen-turbo-2024-11-01": 0.15,
|
385
|
-
"qwen-max-latest":
|
385
|
+
"qwen-max-latest": 1.2,
|
386
|
+
"qwen2.5-max": 1.2,
|
386
387
|
|
387
388
|
"qwen-vl-max-latest": 1.5,
|
388
389
|
"qwen-vl-plus-latest": 0.75,
|
@@ -754,7 +755,6 @@ COMPLETION_RATIO = {
|
|
754
755
|
|
755
756
|
"gemini-exp-1206": 5,
|
756
757
|
|
757
|
-
|
758
758
|
"gemini-2.0-flash": 4,
|
759
759
|
"gemini-2.0-flash-001": 4,
|
760
760
|
|
@@ -778,13 +778,14 @@ COMPLETION_RATIO = {
|
|
778
778
|
"qwen-vl-plus-latest": 3,
|
779
779
|
"qwen2-vl-7b-instruct": 5,
|
780
780
|
"qwen2-vl-72b-instruct": 5,
|
781
|
-
"qwen-max-latest":
|
781
|
+
"qwen-max-latest": 4,
|
782
|
+
"qwen2.5-max": 4,
|
782
783
|
|
783
784
|
"qwen2.5-7b-instruct": 4,
|
784
|
-
"qwen2.5-14b-instruct":
|
785
|
-
"qwen2.5-32b-instruct":
|
786
|
-
"qwen2.5-72b-instruct":
|
787
|
-
"qwen2.5-math-72b-instruct":
|
785
|
+
"qwen2.5-14b-instruct": 4,
|
786
|
+
"qwen2.5-32b-instruct": 4,
|
787
|
+
"qwen2.5-72b-instruct": 4,
|
788
|
+
"qwen2.5-math-72b-instruct": 4,
|
788
789
|
|
789
790
|
"deepseek-vl2": 4,
|
790
791
|
"deepseek-ai/deepseek-vl2": 4,
|
File without changes
|
File without changes
|
{MeUtils-2025.2.6.19.49.50.dist-info → MeUtils-2025.2.6.20.41.23.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|