MeUtils 2024.12.5.12.28.40__py3-none-any.whl → 2024.12.5.15.58.45__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-2024.12.5.12.28.40.dist-info → MeUtils-2024.12.5.15.58.45.dist-info}/METADATA +30 -30
- {MeUtils-2024.12.5.12.28.40.dist-info → MeUtils-2024.12.5.15.58.45.dist-info}/RECORD +12 -11
- examples/_openaisdk/openai_modelscope.py +50 -0
- meutils/apis/textin.py +3 -2
- meutils/data/VERSION +1 -1
- meutils/data/oneapi/NOTICE.md +4 -0
- meutils/schemas/image_types.py +14 -1
- meutils/schemas/oneapi/common.py +8 -1
- {MeUtils-2024.12.5.12.28.40.dist-info → MeUtils-2024.12.5.15.58.45.dist-info}/LICENSE +0 -0
- {MeUtils-2024.12.5.12.28.40.dist-info → MeUtils-2024.12.5.15.58.45.dist-info}/WHEEL +0 -0
- {MeUtils-2024.12.5.12.28.40.dist-info → MeUtils-2024.12.5.15.58.45.dist-info}/entry_points.txt +0 -0
- {MeUtils-2024.12.5.12.28.40.dist-info → MeUtils-2024.12.5.15.58.45.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: MeUtils
|
3
|
-
Version: 2024.12.5.
|
3
|
+
Version: 2024.12.5.15.58.45
|
4
4
|
Summary: description
|
5
5
|
Home-page: https://github.com/yuanjie-ai/MeUtils
|
6
6
|
Author: yuanjie
|
@@ -61,42 +61,42 @@ Requires-Dist: sse-starlette ; extra == 'ai'
|
|
61
61
|
Requires-Dist: openai ; extra == 'ai'
|
62
62
|
Requires-Dist: langchain ; extra == 'ai'
|
63
63
|
Provides-Extra: all
|
64
|
-
Requires-Dist: sse-starlette ; extra == 'all'
|
65
64
|
Requires-Dist: pretty-errors ; extra == 'all'
|
66
|
-
Requires-Dist:
|
67
|
-
Requires-Dist:
|
68
|
-
Requires-Dist:
|
69
|
-
Requires-Dist: openai ; extra == 'all'
|
70
|
-
Requires-Dist: pymilvus ; extra == 'all'
|
71
|
-
Requires-Dist: geopy ; extra == 'all'
|
65
|
+
Requires-Dist: streamlit ; extra == 'all'
|
66
|
+
Requires-Dist: pymupd ; extra == 'all'
|
67
|
+
Requires-Dist: jieba ; extra == 'all'
|
72
68
|
Requires-Dist: jinja2 ; extra == 'all'
|
73
|
-
Requires-Dist:
|
74
|
-
Requires-Dist: missingno ; extra == 'all'
|
75
|
-
Requires-Dist: jmespath ; extra == 'all'
|
76
|
-
Requires-Dist: thriftpy2 ; extra == 'all'
|
69
|
+
Requires-Dist: geopy ; extra == 'all'
|
77
70
|
Requires-Dist: sqlalchemy ; extra == 'all'
|
78
|
-
Requires-Dist: pymysql ; extra == 'all'
|
79
|
-
Requires-Dist: pandas-profiling[notebook] ; extra == 'all'
|
80
|
-
Requires-Dist: schedule ; extra == 'all'
|
81
|
-
Requires-Dist: redis-py-cluster ; extra == 'all'
|
82
|
-
Requires-Dist: filetype ; extra == 'all'
|
83
|
-
Requires-Dist: dataframe-image ; extra == 'all'
|
84
|
-
Requires-Dist: gunicorn ; extra == 'all'
|
85
|
-
Requires-Dist: uvicorn ; extra == 'all'
|
86
|
-
Requires-Dist: fastapi[all] ; extra == 'all'
|
87
71
|
Requires-Dist: seaborn ; extra == 'all'
|
88
|
-
Requires-Dist:
|
89
|
-
Requires-Dist: pymongo ; extra == 'all'
|
90
|
-
Requires-Dist: simplejson ; extra == 'all'
|
91
|
-
Requires-Dist: jieba ; extra == 'all'
|
72
|
+
Requires-Dist: pymilvus ; extra == 'all'
|
92
73
|
Requires-Dist: pandas-summary ; extra == 'all'
|
93
|
-
Requires-Dist:
|
94
|
-
Requires-Dist:
|
95
|
-
Requires-Dist:
|
96
|
-
Requires-Dist:
|
74
|
+
Requires-Dist: polars ; extra == 'all'
|
75
|
+
Requires-Dist: simplejson ; extra == 'all'
|
76
|
+
Requires-Dist: thriftpy2 ; extra == 'all'
|
77
|
+
Requires-Dist: gunicorn ; extra == 'all'
|
78
|
+
Requires-Dist: redis-py-cluster ; extra == 'all'
|
97
79
|
Requires-Dist: faiss-cpu ; extra == 'all'
|
98
|
-
Requires-Dist:
|
80
|
+
Requires-Dist: uvicorn ; extra == 'all'
|
81
|
+
Requires-Dist: pandas-profiling[notebook] ; extra == 'all'
|
82
|
+
Requires-Dist: langchain ; extra == 'all'
|
83
|
+
Requires-Dist: fastapi ; extra == 'all'
|
99
84
|
Requires-Dist: iteration-utilities ; extra == 'all'
|
85
|
+
Requires-Dist: openai ; extra == 'all'
|
86
|
+
Requires-Dist: fastapi[all] ; extra == 'all'
|
87
|
+
Requires-Dist: cachetools ; extra == 'all'
|
88
|
+
Requires-Dist: filetype ; extra == 'all'
|
89
|
+
Requires-Dist: sse-starlette ; extra == 'all'
|
90
|
+
Requires-Dist: pymysql ; extra == 'all'
|
91
|
+
Requires-Dist: missingno ; extra == 'all'
|
92
|
+
Requires-Dist: reportlab ; extra == 'all'
|
93
|
+
Requires-Dist: dataframe-image ; extra == 'all'
|
94
|
+
Requires-Dist: pymongo ; extra == 'all'
|
95
|
+
Requires-Dist: schedule ; extra == 'all'
|
96
|
+
Requires-Dist: pyarrow ; extra == 'all'
|
97
|
+
Requires-Dist: asyncmy ; extra == 'all'
|
98
|
+
Requires-Dist: jmespath ; extra == 'all'
|
99
|
+
Requires-Dist: thefuck ; extra == 'all'
|
100
100
|
Provides-Extra: ann
|
101
101
|
Requires-Dist: pymilvus ; extra == 'ann'
|
102
102
|
Requires-Dist: faiss-cpu ; extra == 'ann'
|
@@ -100,6 +100,7 @@ examples/_openaisdk/openai_god.py,sha256=O8fbhyxiIlVR7pTvBTXgQ2QTwfcZ2MkEIyDe_jp
|
|
100
100
|
examples/_openaisdk/openai_groq.py,sha256=_5Ue1yEx0Gp6theFioB_D8kepR0UlqMU96PVGH-LkVY,7363
|
101
101
|
examples/_openaisdk/openai_images.py,sha256=vGuKEbHxuK70Ls2PTbWUeET9q88Kncn22YLBp14bMO8,5114
|
102
102
|
examples/_openaisdk/openai_json.py,sha256=1VfsTKe4yNX1rTRvzlz9oE3FWji_gf36H5OvUNfG0sw,1843
|
103
|
+
examples/_openaisdk/openai_modelscope.py,sha256=bKBtXpEN3_YxXRwlQEBV1YmjzT396zxByqdB6nxaEGI,1291
|
103
104
|
examples/_openaisdk/openai_moon.py,sha256=Y7RrB6SUi9taQOlA50nfGTpQa9ON6XmPmrxtL-hSL8M,1753
|
104
105
|
examples/_openaisdk/openai_search.py,sha256=HKRTU6y9j_nUfZgrJt2eZ84d7TVT39WN-dcA_BFkVb4,937
|
105
106
|
examples/_openaisdk/openai_sensenova.py,sha256=TnJpHcD1tG5w_x5DsgFgBRWrU8XUkww0uCebgNFfZDM,3216
|
@@ -294,7 +295,7 @@ meutils/apis/kuaidi.py,sha256=4KrtOkbGlsLpyvbY80UMSo03iFqFiBHnE0CiqAWWQ4Y,998
|
|
294
295
|
meutils/apis/llm_qa.py,sha256=XM1VMkOTb4xKzgVk56dPC1e8lg7SbnfobBVgfLXiX9A,1207
|
295
296
|
meutils/apis/niutrans.py,sha256=weWjn-tUTEaAUe5RGbzcjQqPkJxGDrPwMB6CnaiZSsg,1682
|
296
297
|
meutils/apis/search_music.py,sha256=HBLtdterztrccnLAPZrWBlrYSx4WCRflCqz-V30fOA8,972
|
297
|
-
meutils/apis/textin.py,sha256=
|
298
|
+
meutils/apis/textin.py,sha256=jJC84Ca17bYF8VZU7IXkd7754EWgPJK-tgl1V59BraU,4811
|
298
299
|
meutils/apis/ts.py,sha256=Q13EOS9Q-Y2-KwOG_cFMVmGj9RUmDtxk5A3E27dxbN0,1511
|
299
300
|
meutils/apis/web_search.py,sha256=6gS3leIB2iyeLtqhB0IbpL_mKzDgArRTqnR7odTWT3E,1035
|
300
301
|
meutils/apis/yezi.py,sha256=26vhnA3lC5049Rqx-CHO-wyGKbdZAfvjEOG90W38cr0,3675
|
@@ -465,14 +466,14 @@ meutils/config_utils/lark_utils/demo.py,sha256=3g0Fs7oLaeW75T60gYWMLgyNg1OnfOjfH
|
|
465
466
|
meutils/config_utils/lark_utils/x.py,sha256=MlMQGhehP9xMEgetxVCX68XFaosfKoW1JA5cZ3JqN2w,1857
|
466
467
|
meutils/crawlers/__init__.py,sha256=TBU4xA-IOsHV-0yIkW7YXxn_QT7TT8NncqxO7IykEfs,271
|
467
468
|
meutils/data/SimHei.ttf,sha256=-XEnekS5yHP_URkT4XBI2w22ylV-KxudhkeIYFbrILA,10062565
|
468
|
-
meutils/data/VERSION,sha256=
|
469
|
+
meutils/data/VERSION,sha256=ejsUN1se0NIgZaYpaanFbbntU-As4bHY0gLJqOyLlBM,19
|
469
470
|
meutils/data/_FLAG,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
470
471
|
meutils/data/_SUCCESS,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
471
472
|
meutils/data/__init__.py,sha256=Hfwkkxs4zHqKhxht0YrhS566a9P5axtmgNvM5wF8ceQ,243
|
472
473
|
meutils/data/coordinate.py,sha256=VbFtcdho0XG4j-rZD0DgqcIf2_LR2LlbLtfhLXbxiDY,600
|
473
474
|
meutils/data/cowboy-hat-face.webp,sha256=AHi2t-WclDVKWgGEe-oZzI4xKACNlgGWUgd622y0K-E,24814
|
474
475
|
meutils/data/oneapi/FOOTER.md,sha256=UHv39ey2ICocxPoCj-UI_PWyyWxZYLS8zG1inqtWNQ4,448
|
475
|
-
meutils/data/oneapi/NOTICE.md,sha256=
|
476
|
+
meutils/data/oneapi/NOTICE.md,sha256=PXUnFv_3MBM-MTrrvQrCFQdPjubM-1bTy_tIE9lREEg,1855
|
476
477
|
meutils/data/oneapi/__init__.py,sha256=cm2Kq2RDXPfdVMWcoBB77bu00zJpTDd21Rgc6bTlhws,398
|
477
478
|
meutils/db/__init__.py,sha256=HR99rqxoFTWXUHDhLVl33tzIn8M86gigHLmEzOKH1Ec,7637
|
478
479
|
meutils/db/mongo.py,sha256=B-B_t939rxtnNGt0PxhivjIUwinmHPzLUpXsjUIaTkQ,2337
|
@@ -640,7 +641,7 @@ meutils/schemas/fish_types.py,sha256=yC0ZFr3Ebh8F0OhtMsXYaIfNNvzOM2LT9YtKTaRoHGU
|
|
640
641
|
meutils/schemas/hailuo_types.py,sha256=hmkjFPID5HS26Ayk80xS2a38XcubokEHxzg86cC0Ki8,6150
|
641
642
|
meutils/schemas/haimian_types.py,sha256=jGu484UviAeBgy5OIUyRY4uYCxXfv16zDPqiJQr9wNQ,1364
|
642
643
|
meutils/schemas/idphoto_types.py,sha256=nuHbpppejRSkJCiQ7YKx0Gnke0ShKZhOvdg0e7tk9-0,1074
|
643
|
-
meutils/schemas/image_types.py,sha256=
|
644
|
+
meutils/schemas/image_types.py,sha256=mba128lFaIGhPcUJG5JZeDGxNYFRgkJrMuWPY8iG6LA,11569
|
644
645
|
meutils/schemas/jina_types.py,sha256=SLRRBCap2B1uXnHF7Sgnlz1Work8HvdIltjj4oVlGTk,8826
|
645
646
|
meutils/schemas/kimi_types.py,sha256=PjCgHwCDNzKasn4X6rUzvOENqKYT3xj07cgp71IdsDA,3607
|
646
647
|
meutils/schemas/kling_types.py,sha256=brWaREBtQeZGUuwgOW2p-vIm2WWInYkq8UfrLInT-Ik,6959
|
@@ -673,7 +674,7 @@ meutils/schemas/db/__init__.py,sha256=m1maURVoM6dIW0yt6ELZrZTzULtkHybVOSXtHNJRVI
|
|
673
674
|
meutils/schemas/db/oneapi_types.py,sha256=Jtt1hXRS5C3DHf_wrkjklVcdPllsAFrzvLq9JLuTdtc,2858
|
674
675
|
meutils/schemas/oneapi/__init__.py,sha256=uevbi3QAvFzN9WPbx9bYKTDyKt7P2ueZO6W0nSiD0sk,289
|
675
676
|
meutils/schemas/oneapi/_types.py,sha256=ClvAaNy3SahEN8lL8KEErHTD6HANelXUeKc_3iLfosQ,1488
|
676
|
-
meutils/schemas/oneapi/common.py,sha256=
|
677
|
+
meutils/schemas/oneapi/common.py,sha256=GbOIYs2JIvmO_9GVKE-EY6ddeHbAPpu4uz8k0AHQe2o,22822
|
677
678
|
meutils/schemas/oneapi/icons.py,sha256=T7W5gInBJoHe62wzMimbG_UI-wn3_-rmQ1O4O2z-CQY,1089
|
678
679
|
meutils/schemas/oneapi/model_group_info.py,sha256=rGtflYJuFIjk5MsVEvK9JUR4IciX8jfErqeLqf8DIlQ,1586
|
679
680
|
meutils/schemas/oneapi/model_info.py,sha256=_uwKEPIIqm7ZYfhmpxtXB2QNsS83SpJY-OaBzvogC9w,772
|
@@ -800,9 +801,9 @@ meutils/tools/seize.py,sha256=nOKAS63w-Lbi48I0m2MPhdsokUTwxco0laPxYVmW4Mw,1064
|
|
800
801
|
meutils/tools/service_monitor.py,sha256=ibsLtBN2g2DL7ZnLJ8vhiZOiOcqTAyx711djDdBK-3M,1255
|
801
802
|
meutils/tools/sys_monitor.py,sha256=6MoyzrItqDUOSjfHcMJmMofQkEPTW36CT_aKui0rg84,429
|
802
803
|
meutils/tools/token_monitor.py,sha256=Np-YK-R4P4IPAXyZvMxwvXI4sFmNJQAQK1lSegNaYpA,997
|
803
|
-
MeUtils-2024.12.5.
|
804
|
-
MeUtils-2024.12.5.
|
805
|
-
MeUtils-2024.12.5.
|
806
|
-
MeUtils-2024.12.5.
|
807
|
-
MeUtils-2024.12.5.
|
808
|
-
MeUtils-2024.12.5.
|
804
|
+
MeUtils-2024.12.5.15.58.45.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
805
|
+
MeUtils-2024.12.5.15.58.45.dist-info/METADATA,sha256=pX7J_TAl9dKT6WkF8EL9fmlWdJtamv5VqD7LigZOXrc,6143
|
806
|
+
MeUtils-2024.12.5.15.58.45.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
807
|
+
MeUtils-2024.12.5.15.58.45.dist-info/entry_points.txt,sha256=lufZlBHRqqZKdY-ZQJ4CSZb0qhV5hQC37egZna9M7ug,357
|
808
|
+
MeUtils-2024.12.5.15.58.45.dist-info/top_level.txt,sha256=cInfxMmkgNOskurdjwP5unau4rA7Uw48nu07tYhS7KY,22
|
809
|
+
MeUtils-2024.12.5.15.58.45.dist-info/RECORD,,
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
# @Project : AI. @by PyCharm
|
4
|
+
# @File : openai_siliconflow
|
5
|
+
# @Time : 2024/6/26 10:42
|
6
|
+
# @Author : betterme
|
7
|
+
# @WeChat : meutils
|
8
|
+
# @Software : PyCharm
|
9
|
+
# @Description :
|
10
|
+
"""
|
11
|
+
Qwen/Qwen2.5-Coder-32B-InstructQwen/Qwen2.5-Coder-14B-InstructQwen/Qwen2.5-Coder-7B-InstructQwen/Qwen2.5-72B-InstructQwen/Qwen2.5-32B-InstructQwen/Qwen2.5-14B-InstructQwen/Qwen2.5-7B-Instruct
|
12
|
+
|
13
|
+
"""
|
14
|
+
import os
|
15
|
+
|
16
|
+
from meutils.pipe import *
|
17
|
+
from openai import OpenAI
|
18
|
+
from openai import OpenAI, APIStatusError
|
19
|
+
|
20
|
+
client = OpenAI(
|
21
|
+
# api_key=os.getenv("STEP_API_KEY"),
|
22
|
+
# base_url="https://api.stepfun.com/v1",
|
23
|
+
base_url=os.getenv("MODELSCOPE_BASE_URL"),
|
24
|
+
api_key=os.getenv("MODELSCOPE_API_KEY")
|
25
|
+
)
|
26
|
+
|
27
|
+
print(client.models.list())
|
28
|
+
|
29
|
+
try:
|
30
|
+
completion = client.chat.completions.create(
|
31
|
+
# model="step-1-8k",
|
32
|
+
model="Qwen/QwQ-32B-Preview",
|
33
|
+
messages=[
|
34
|
+
{"role": "user", "content": "讲个故事"}
|
35
|
+
],
|
36
|
+
# top_p=0.7,
|
37
|
+
top_p=None,
|
38
|
+
temperature=None,
|
39
|
+
stream=True,
|
40
|
+
max_tokens=1000
|
41
|
+
)
|
42
|
+
except APIStatusError as e:
|
43
|
+
print(e.status_code)
|
44
|
+
|
45
|
+
print(e.response)
|
46
|
+
print(e.message)
|
47
|
+
print(e.code)
|
48
|
+
|
49
|
+
for chunk in completion:
|
50
|
+
print(chunk.choices[0].delta.content)
|
meutils/apis/textin.py
CHANGED
@@ -89,7 +89,7 @@ async def document_process(data: bytes,
|
|
89
89
|
# "proxies": proxies,
|
90
90
|
}
|
91
91
|
|
92
|
-
if response_format == "url" and service in {"watermark-remove", "
|
92
|
+
if response_format == "url" and service in {"watermark-remove", "crop_enhance_image"}:
|
93
93
|
if "data" not in _:
|
94
94
|
send_message(_, title=__name__)
|
95
95
|
|
@@ -122,12 +122,13 @@ if __name__ == '__main__':
|
|
122
122
|
|
123
123
|
# service = "pdf_to_markdown"
|
124
124
|
|
125
|
-
service = '
|
125
|
+
service = 'bill_recognize_v2'
|
126
126
|
|
127
127
|
async def main(n=1):
|
128
128
|
for i in tqdm(range(n)):
|
129
129
|
try:
|
130
130
|
_ = await document_process(data, service=service)
|
131
|
+
logger.debug(bjson(_))
|
131
132
|
except Exception as e:
|
132
133
|
logger.error(f"{i}: {e}")
|
133
134
|
break
|
meutils/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2024.12.05.
|
1
|
+
2024.12.05.15.58.45
|
meutils/data/oneapi/NOTICE.md
CHANGED
meutils/schemas/image_types.py
CHANGED
@@ -385,11 +385,24 @@ class HunyuanImageProcessRequest(ImageProcessRequest):
|
|
385
385
|
|
386
386
|
|
387
387
|
TEXTIN_TASKS = {
|
388
|
+
# 文本解析
|
388
389
|
"image-to-markdown": "pdf_to_markdown",
|
389
390
|
"pdf-to-markdown": "pdf_to_markdown",
|
391
|
+
"textin-pdf-to-markdown": "pdf_to_markdown",
|
392
|
+
|
393
|
+
# 去水印
|
390
394
|
'textin-removewatermark': 'watermark-remove',
|
395
|
+
|
396
|
+
'textin-ocr': 'text_recognize_3d1',
|
391
397
|
'text-recognize': 'text_recognize_3d1',
|
392
|
-
|
398
|
+
|
399
|
+
# 图片提取表格
|
400
|
+
"textin-table": "table",
|
401
|
+
|
402
|
+
"textin-crop-enhance": "crop_enhance_image",
|
403
|
+
|
404
|
+
# 票据识别
|
405
|
+
"textin-bill-recognize": "bill_recognize_v2",
|
393
406
|
}
|
394
407
|
|
395
408
|
|
meutils/schemas/oneapi/common.py
CHANGED
@@ -176,7 +176,6 @@ MODEL_PRICE = {
|
|
176
176
|
"gpt-4-all": 0.1,
|
177
177
|
"gpt-4o-all": 0.1,
|
178
178
|
|
179
|
-
"gpt-4-mobile": 0.1,
|
180
179
|
"gpt-4-gizmo-*": 0.1,
|
181
180
|
"advanced-voice": 1,
|
182
181
|
|
@@ -236,6 +235,10 @@ MODEL_PRICE = {
|
|
236
235
|
}
|
237
236
|
|
238
237
|
MODEL_RATIO = {
|
238
|
+
# 智能体
|
239
|
+
"gpt-4-plus": 2.5,
|
240
|
+
"gpt-4o-plus": 2.5,
|
241
|
+
|
239
242
|
# embedding & rerank
|
240
243
|
"rerank-multilingual-v2.0": 0.1,
|
241
244
|
"rerank-multilingual-v3.0": 0.1,
|
@@ -550,6 +553,10 @@ MODEL_RATIO = {
|
|
550
553
|
}
|
551
554
|
|
552
555
|
COMPLETION_RATIO = {
|
556
|
+
# 智能体
|
557
|
+
"gpt-4-plus": 5,
|
558
|
+
"gpt-4o-plus": 5,
|
559
|
+
|
553
560
|
"grok": 3,
|
554
561
|
"grok-beta": 3,
|
555
562
|
"x-ai/grok-beta": 3,
|
File without changes
|
File without changes
|
{MeUtils-2024.12.5.12.28.40.dist-info → MeUtils-2024.12.5.15.58.45.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|