MeUtils 2024.12.9.17.20.54__py3-none-any.whl → 2024.12.12.17.3.48__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.9.17.20.54.dist-info → MeUtils-2024.12.12.17.3.48.dist-info}/METADATA +27 -26
- {MeUtils-2024.12.9.17.20.54.dist-info → MeUtils-2024.12.12.17.3.48.dist-info}/RECORD +27 -21
- examples/_openaisdk/openai_json.py +6 -4
- examples/_openaisdk/openai_oi.py +60 -0
- examples/_openaisdk/openai_test.py +66 -0
- examples/_openaisdk/openai_zhipu.py +36 -33
- examples/cache_demo/HermesCache_demo.py +30 -16
- meutils/apis/chatglm/glm_video_api.py +3 -1
- meutils/apis/hailuoai/videos.py +5 -6
- meutils/apis/monica/__init__.py +11 -0
- meutils/apis/monica/llm.py +11 -0
- meutils/apis/search/metaso.py +1 -1
- meutils/apis/siliconflow/images.py +9 -2
- meutils/apis/siliconflow/videos.py +33 -0
- meutils/cache/hcache.py +48 -0
- meutils/config_utils/config_manager.py +1 -0
- meutils/config_utils/nacosx.py +2 -0
- meutils/data/VERSION +1 -1
- meutils/data/oneapi/NOTICE.md +30 -0
- meutils/db/redis_db.py +5 -2
- meutils/llm/completions/oi.py +16 -0
- meutils/schemas/oneapi/common.py +7 -7
- meutils/schemas/siliconflow_types.py +9 -0
- meutils/cache/redis_cache.py +0 -33
- {MeUtils-2024.12.9.17.20.54.dist-info → MeUtils-2024.12.12.17.3.48.dist-info}/LICENSE +0 -0
- {MeUtils-2024.12.9.17.20.54.dist-info → MeUtils-2024.12.12.17.3.48.dist-info}/WHEEL +0 -0
- {MeUtils-2024.12.9.17.20.54.dist-info → MeUtils-2024.12.12.17.3.48.dist-info}/entry_points.txt +0 -0
- {MeUtils-2024.12.9.17.20.54.dist-info → MeUtils-2024.12.12.17.3.48.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.
|
3
|
+
Version: 2024.12.12.17.3.48
|
4
4
|
Summary: description
|
5
5
|
Home-page: https://github.com/yuanjie-ai/MeUtils
|
6
6
|
Author: yuanjie
|
@@ -51,6 +51,7 @@ Requires-Dist: aiostream
|
|
51
51
|
Requires-Dist: diskcache
|
52
52
|
Requires-Dist: cachetools
|
53
53
|
Requires-Dist: aiocache
|
54
|
+
Requires-Dist: HermesCache
|
54
55
|
Provides-Extra: ai
|
55
56
|
Requires-Dist: faiss-cpu ; extra == 'ai'
|
56
57
|
Requires-Dist: streamlit ; extra == 'ai'
|
@@ -61,42 +62,42 @@ Requires-Dist: sse-starlette ; extra == 'ai'
|
|
61
62
|
Requires-Dist: openai ; extra == 'ai'
|
62
63
|
Requires-Dist: langchain ; extra == 'ai'
|
63
64
|
Provides-Extra: all
|
64
|
-
Requires-Dist:
|
65
|
-
Requires-Dist: uvicorn ; extra == 'all'
|
66
|
-
Requires-Dist: openai ; extra == 'all'
|
67
|
-
Requires-Dist: sse-starlette ; extra == 'all'
|
65
|
+
Requires-Dist: pyarrow ; extra == 'all'
|
68
66
|
Requires-Dist: langchain ; extra == 'all'
|
69
|
-
Requires-Dist:
|
67
|
+
Requires-Dist: asyncmy ; extra == 'all'
|
68
|
+
Requires-Dist: pymongo ; extra == 'all'
|
69
|
+
Requires-Dist: fastapi[all] ; extra == 'all'
|
70
|
+
Requires-Dist: geopy ; extra == 'all'
|
70
71
|
Requires-Dist: redis-py-cluster ; extra == 'all'
|
71
72
|
Requires-Dist: pretty-errors ; extra == 'all'
|
72
|
-
Requires-Dist:
|
73
|
-
Requires-Dist: streamlit ; extra == 'all'
|
74
|
-
Requires-Dist: cachetools ; extra == 'all'
|
73
|
+
Requires-Dist: gunicorn ; extra == 'all'
|
75
74
|
Requires-Dist: pymilvus ; extra == 'all'
|
76
|
-
Requires-Dist:
|
75
|
+
Requires-Dist: polars ; extra == 'all'
|
76
|
+
Requires-Dist: sqlalchemy ; extra == 'all'
|
77
|
+
Requires-Dist: pandas-summary ; extra == 'all'
|
78
|
+
Requires-Dist: streamlit ; extra == 'all'
|
79
|
+
Requires-Dist: faiss-cpu ; extra == 'all'
|
77
80
|
Requires-Dist: pymupd ; extra == 'all'
|
78
|
-
Requires-Dist:
|
79
|
-
Requires-Dist:
|
80
|
-
Requires-Dist:
|
81
|
-
Requires-Dist:
|
82
|
-
Requires-Dist:
|
83
|
-
Requires-Dist: pandas-profiling[notebook] ; extra == 'all'
|
84
|
-
Requires-Dist: fastapi ; extra == 'all'
|
85
|
-
Requires-Dist: geopy ; extra == 'all'
|
81
|
+
Requires-Dist: jieba ; extra == 'all'
|
82
|
+
Requires-Dist: openai ; extra == 'all'
|
83
|
+
Requires-Dist: filetype ; extra == 'all'
|
84
|
+
Requires-Dist: cachetools ; extra == 'all'
|
85
|
+
Requires-Dist: reportlab ; extra == 'all'
|
86
86
|
Requires-Dist: schedule ; extra == 'all'
|
87
|
-
Requires-Dist: seaborn ; extra == 'all'
|
88
|
-
Requires-Dist: polars ; extra == 'all'
|
89
87
|
Requires-Dist: iteration-utilities ; extra == 'all'
|
90
|
-
Requires-Dist:
|
91
|
-
Requires-Dist:
|
88
|
+
Requires-Dist: uvicorn ; extra == 'all'
|
89
|
+
Requires-Dist: jmespath ; extra == 'all'
|
92
90
|
Requires-Dist: pymysql ; extra == 'all'
|
93
|
-
Requires-Dist: sqlalchemy ; extra == 'all'
|
94
|
-
Requires-Dist: faiss-cpu ; extra == 'all'
|
95
91
|
Requires-Dist: missingno ; extra == 'all'
|
96
|
-
Requires-Dist: pandas-summary ; extra == 'all'
|
97
92
|
Requires-Dist: thefuck ; extra == 'all'
|
93
|
+
Requires-Dist: simplejson ; extra == 'all'
|
94
|
+
Requires-Dist: pandas-profiling[notebook] ; extra == 'all'
|
98
95
|
Requires-Dist: jinja2 ; extra == 'all'
|
99
|
-
Requires-Dist:
|
96
|
+
Requires-Dist: thriftpy2 ; extra == 'all'
|
97
|
+
Requires-Dist: sse-starlette ; extra == 'all'
|
98
|
+
Requires-Dist: dataframe-image ; extra == 'all'
|
99
|
+
Requires-Dist: seaborn ; extra == 'all'
|
100
|
+
Requires-Dist: fastapi ; extra == 'all'
|
100
101
|
Provides-Extra: ann
|
101
102
|
Requires-Dist: pymilvus ; extra == 'ann'
|
102
103
|
Requires-Dist: faiss-cpu ; extra == 'ann'
|
@@ -99,15 +99,17 @@ examples/_openaisdk/openai_files.py,sha256=gfUbKGZg5P7c3kSMfwalIThi_SEs8O-JTqx49
|
|
99
99
|
examples/_openaisdk/openai_god.py,sha256=O8fbhyxiIlVR7pTvBTXgQ2QTwfcZ2MkEIyDe_jp797A,1056
|
100
100
|
examples/_openaisdk/openai_groq.py,sha256=_5Ue1yEx0Gp6theFioB_D8kepR0UlqMU96PVGH-LkVY,7363
|
101
101
|
examples/_openaisdk/openai_images.py,sha256=vGuKEbHxuK70Ls2PTbWUeET9q88Kncn22YLBp14bMO8,5114
|
102
|
-
examples/_openaisdk/openai_json.py,sha256=
|
102
|
+
examples/_openaisdk/openai_json.py,sha256=M4tq_IkzYbmtgbFilGQHmRdJhH0OltiwGk7cK7uc-sQ,1850
|
103
103
|
examples/_openaisdk/openai_modelscope.py,sha256=bKBtXpEN3_YxXRwlQEBV1YmjzT396zxByqdB6nxaEGI,1291
|
104
104
|
examples/_openaisdk/openai_moon.py,sha256=Y7RrB6SUi9taQOlA50nfGTpQa9ON6XmPmrxtL-hSL8M,1753
|
105
|
+
examples/_openaisdk/openai_oi.py,sha256=AZF4HDWBrM19o8ey_bUb2AwK8KIGoraItuKqHgT6IZs,1378
|
105
106
|
examples/_openaisdk/openai_search.py,sha256=HKRTU6y9j_nUfZgrJt2eZ84d7TVT39WN-dcA_BFkVb4,937
|
106
107
|
examples/_openaisdk/openai_sensenova.py,sha256=TnJpHcD1tG5w_x5DsgFgBRWrU8XUkww0uCebgNFfZDM,3216
|
107
108
|
examples/_openaisdk/openai_siliconflow.py,sha256=UI8MyhXAt2hd4JMjbvVGwc8dA9ARSwf77TePGe08kP0,1402
|
108
109
|
examples/_openaisdk/openai_step.py,sha256=rwXrGRs5CHhWpNl9oeIHltErp1Or_B3PVKNAoMGY-0c,1054
|
110
|
+
examples/_openaisdk/openai_test.py,sha256=OdtT8qxKbh4S8H2T_zgMShn8VMQ_xSWttfqNSYT2hNw,1905
|
109
111
|
examples/_openaisdk/openai_tune.py,sha256=rDmX_EMsAhD0gKJPQ8P0-icZQAjV6OMkMLX67uwJtvU,674
|
110
|
-
examples/_openaisdk/openai_zhipu.py,sha256=
|
112
|
+
examples/_openaisdk/openai_zhipu.py,sha256=Wt_fYOAtlRN24CNGfODwTg3MDVhE8CyyF2aN1Ye4ZjE,1629
|
111
113
|
examples/_openaisdk/ppu.py,sha256=jPBufoYt2ZrqNKjgbHr49YZI5vBM-32eBYbhbYduhnY,602
|
112
114
|
examples/_openaisdk/rag.py,sha256=NwNHhfi5FZ2XKCmsScjmM5cxCSfJuqx2jV-69ZXh244,1372
|
113
115
|
examples/_openaisdk/rag_.py,sha256=rNTCO83JK6zqQAiY0vlHZRN5DQNT9_nCYtjeh8lTijU,121217
|
@@ -131,7 +133,7 @@ examples/apis/x.py,sha256=9Ikk04WyxfGpWsp0zp5izYd9OOuPUmb_aNj9DjBTG54,349
|
|
131
133
|
examples/apis/xx.py,sha256=seiBYTFL8iEqSFNcNjIYuwNa4jpqc9YoO7QWBIOdSzU,350
|
132
134
|
examples/arq_demo/__init__.py,sha256=HE2-lA6x7oAvEJRzR9yrEwGuTze_jMUBoeO1Mv7wdGY,271
|
133
135
|
examples/arq_demo/demo.py,sha256=AHiXlio3nom3I1Zb0pdSbOum3L8HHF_6sg5F-EwGJ5g,1389
|
134
|
-
examples/cache_demo/HermesCache_demo.py,sha256=
|
136
|
+
examples/cache_demo/HermesCache_demo.py,sha256=_MD_DPcnAjuKKFD8-A3LytuKuZdA1ZaBe1XisJhzzLQ,1654
|
135
137
|
examples/cache_demo/__init__.py,sha256=zYdsVkzlPyaHOyG9HpW_AMriiEH_Pi8AmLUOS7Jbguk,961
|
136
138
|
examples/cache_demo/acacge.py,sha256=rlwMWUO4tWi9Y-gXnFUsRn__N_AaPP0icDlwDAYcf1Y,577
|
137
139
|
examples/cache_demo/demo.py,sha256=iGuQTfV23eqtGIB8QqfQYa7qRNGPxqkUNAcws-fsh60,2528
|
@@ -311,7 +313,7 @@ meutils/apis/baidu/bdaitpzs.py,sha256=50pe09ECSKRJnXhJVMZlwHhGGc4r8yQrVWjq6d6OK0
|
|
311
313
|
meutils/apis/baidu/test.py,sha256=nb9ivelHIw84-d1V-MNGRpGoTpLFsNXPk-TTKpjwOfQ,2058
|
312
314
|
meutils/apis/chatglm/__init__.py,sha256=uFuc9qY-ZjGqbsfcdGZkcEkhjATojWpzk2WXTTujc70,271
|
313
315
|
meutils/apis/chatglm/glm_video.py,sha256=9LA9pyeIcDDHXGhJbZSJfjxrLeNC3SIuCKJwDIXRKR8,14015
|
314
|
-
meutils/apis/chatglm/glm_video_api.py,sha256=
|
316
|
+
meutils/apis/chatglm/glm_video_api.py,sha256=h1Y7Sg3f98dJV2S9mGiBGGyLHXJHEKzgr8-RJYob8yM,2689
|
315
317
|
meutils/apis/chatglm/images.py,sha256=k2EtOpksgAfJb2MD6kLOKKem713kamTIinRmgr8_3n0,1974
|
316
318
|
meutils/apis/chatglm/temp.py,sha256=zYe6JGUHVfb77T_TdNsdmpTs2D9OyqDTUEkblDAIoYY,17811
|
317
319
|
meutils/apis/chatglm/x.py,sha256=lI86Cd6SN4noCN5HM9gRugcVmjHDtxDTV4m-7Bj61N0,24312
|
@@ -320,7 +322,7 @@ meutils/apis/hailuoai/demo.py,sha256=WTnDFL2HgVpAjcn5BljLrbf2y2aATkvvNy75zoEIQkc
|
|
320
322
|
meutils/apis/hailuoai/hasha_new.py,sha256=1sD3fxmxYrEufmPaJZGAkYJoHKO85hfLXemnY-xYIO8,9101
|
321
323
|
meutils/apis/hailuoai/music.py,sha256=S_oi-ZDbocTfbRgREdXtGx50xzUc1PCZGuxmr917E7M,265
|
322
324
|
meutils/apis/hailuoai/upload.py,sha256=22S6W6hGQhUquVKqh7QCkXb6KHDl3iMKKi6Z0AJdFEI,6501
|
323
|
-
meutils/apis/hailuoai/videos.py,sha256=
|
325
|
+
meutils/apis/hailuoai/videos.py,sha256=TBcYMukzdyrMCdt0ucbSE6UayyOvI29JCa9usvfAkPs,19330
|
324
326
|
meutils/apis/hailuoai/yy.py,sha256=gJvr7VDa0YPEUkZuETdmCFWWheylDPoMUg8gbS_SVw8,8937
|
325
327
|
meutils/apis/hf/__init__.py,sha256=ZZoRl8yNYekoMhE__67XXBKNSYJaLgjtaa0netjJKUU,271
|
326
328
|
meutils/apis/hf/got_ocr.py,sha256=pZURFpryDh_Ak6PNiARztOzYgkjVrfScJ5-0XzMBrzI,1776
|
@@ -368,6 +370,8 @@ meutils/apis/luma/__init__.py,sha256=51W483rgmMqFlRIHlkIIcKYMqggH4eY_bmV_mD3p7QI
|
|
368
370
|
meutils/apis/luma/luma.py,sha256=dAWZj2Q4t5eJNJbbtCfmUNDb1wx_OKxxtrZr0szI6tw,6026
|
369
371
|
meutils/apis/minicpm/__init__.py,sha256=XTg1aG_3CiGK7XN-APqWVbJf5OV96IKO9vliKmPUEHg,243
|
370
372
|
meutils/apis/minicpm/luca.py,sha256=eNDbHrFXRQi7XZkz3aFTnVpKriyqg1Ka4XAS7UPUI_4,4852
|
373
|
+
meutils/apis/monica/__init__.py,sha256=qOLqpdpLAJn5GII-2VWqSjpprr3FJgEJjQ6N0KAVcdM,272
|
374
|
+
meutils/apis/monica/llm.py,sha256=gYyBPOTvmoNFaa1KmW3OlSsRKeN7C97EyPUa264nJ08,264
|
371
375
|
meutils/apis/napkin/__init__.py,sha256=EWwpRJEbN46d6Dk9PHAZvsYmqD_EOK0jjKQL1kYtcKs,271
|
372
376
|
meutils/apis/napkin/icons.py,sha256=_L8EaSeQ6ChT5w7q3jnj_AcRhKvNiBg3-qUKo9JQ12o,2217
|
373
377
|
meutils/apis/oneapi/__init__.py,sha256=wg_kqNkFqOkP70vnOHvAeKREps57Rqliu5yKC0gsgLk,284
|
@@ -390,17 +394,18 @@ meutils/apis/runwayml/__init__.py,sha256=90oL_3o8YkFPYm4R4PCxd3m9hgnHpOCLr0u-X4B
|
|
390
394
|
meutils/apis/runwayml/gen.py,sha256=JrfegC4pI2r7DprDLGMi5px0K1C1pSgopnz0lcJU5RY,5194
|
391
395
|
meutils/apis/search/__init__.py,sha256=TWEHzb_O2hKDpjfThEWOz1EI1bJeiN20IAvC8wYONQ4,271
|
392
396
|
meutils/apis/search/baichuan.py,sha256=OUD0TH7KzqSxtuRJgjJPWO8XRQIoUwW5RX7lWMo7BXw,268
|
393
|
-
meutils/apis/search/metaso.py,sha256=
|
397
|
+
meutils/apis/search/metaso.py,sha256=cfllEaDDfmxscdPltbO04MjeRQXSlZFTFYvjmOE6vx4,8553
|
394
398
|
meutils/apis/search/metaso_.py,sha256=PqMX3FLYbbAcc9qpqrPZ58LuSF29h0asZO1XMYmXbes,3144
|
395
399
|
meutils/apis/search/n.py,sha256=o7jzNoR5v_nAjgdUvWgebL3nvvo3ECpq2KCj9YhUNr4,4337
|
396
400
|
meutils/apis/search/searxng.py,sha256=RBPeq-AYj5D42gROrZNg0SxIWwWEW0oqrbQ3wEDH9k8,951
|
397
401
|
meutils/apis/siliconflow/__init__.py,sha256=DQ-A6wAWGna49pmyGhcIWgc2zx6TN9DfQmSUdAW7qjk,241
|
398
402
|
meutils/apis/siliconflow/audio.py,sha256=pk1OROATtAURPQ6VkswmR5gJFOFYJJPnjp-boDAf8X0,2017
|
399
403
|
meutils/apis/siliconflow/image_to_image.py,sha256=Clk-2hACzoUP0yTHnxhlV5MA_HsVdcPuhrX41YARWPM,89439
|
400
|
-
meutils/apis/siliconflow/images.py,sha256=
|
404
|
+
meutils/apis/siliconflow/images.py,sha256=hmzfSJohweytrL6aX7yy7sYamdlPQFwEF9Q3zHdlfIE,5890
|
401
405
|
meutils/apis/siliconflow/rerankers.py,sha256=GuKT33MmAiVULqNaAO9IIy1Zp570-kYJ6xP03eLCp5Y,1259
|
402
406
|
meutils/apis/siliconflow/text_to_image.py,sha256=rDxk6NIj4TjigcSPVDZknQR9nUpK5CTJBXc3KjI1Z8Y,4457
|
403
407
|
meutils/apis/siliconflow/utils.py,sha256=Awe0V7Mkceop1vWWrw9901cKQ6HHntIn8HbIG0fEo40,2091
|
408
|
+
meutils/apis/siliconflow/videos.py,sha256=8EbW-Ai4pvprnjlNRWYXu4msxp4U_sGXnHKof4KxLMc,1071
|
404
409
|
meutils/apis/sunoai/__init__.py,sha256=O8J8jKTmvZGGovkF_jCRl3vbL68a4_dXVSxiKIYTkFo,244
|
405
410
|
meutils/apis/sunoai/haimian.py,sha256=CSISElYbbGFnVCxCgAbHM_YZ9ELUjhuFQ6jdYM0hh7E,5521
|
406
411
|
meutils/apis/sunoai/suno.py,sha256=I7UgqkBd7rd8BvOlZqzkf64n7Z2fjw678OnpP5DOKcM,17156
|
@@ -445,7 +450,7 @@ meutils/async_utils/background.py,sha256=dl6UaMIFBZDB1uxSZzGFJdSnpt3Xo0flK7gwsok
|
|
445
450
|
meutils/async_utils/common.py,sha256=WIQ7CVaZiaUeFA3IInM_4uaehJQiTdr_g3Q_8_yQrgc,4899
|
446
451
|
meutils/async_utils/test.py,sha256=lkZdgSzzgVg8hYVcaBNEJ3KBvFTEfjbXZVvtknQZsRQ,1155
|
447
452
|
meutils/cache/__init__.py,sha256=7ke7BKRUkp1raYrsgOIojHHdeHYNstw9APIdBNDNRzc,2129
|
448
|
-
meutils/cache/
|
453
|
+
meutils/cache/hcache.py,sha256=AgiYUjKO8cfm6uuxQ2nWeaRmf9jkv2AIMvkbMvh_nkU,1139
|
449
454
|
meutils/clis/__init__.py,sha256=2Fhn43X8kFP6FpAnnAMiPcdnjUwQaukiIr2uGB6mGAY,279
|
450
455
|
meutils/clis/browser.py,sha256=eMQ-7LlFJN_Sqs0DMnCVulfdUv9aGhHm5drCViQm4CY,4511
|
451
456
|
meutils/clis/check_api.py,sha256=WKsLupPlM0PI6SzfVOwoqoYNEmOj_Jb-bsRDYA_SXsE,2367
|
@@ -466,28 +471,28 @@ meutils/cmds/subprocess_demo.py,sha256=oTeTIx8k6XwtOT6hZpmy9XNcRErzilqWcdoxcrVcH
|
|
466
471
|
meutils/comp_utils/__init__.py,sha256=Q4BW-gHnOUiSSpupHsprsOAPp4kuBLcH60sL1RfS3PQ,361
|
467
472
|
meutils/comp_utils/reverse_metric.py,sha256=qwcGgiHhaupIJER4gO0HQhhO07FDLFv-vfFhg6K6Q4s,1705
|
468
473
|
meutils/config_utils/__init__.py,sha256=GhgsStfGJDC8F_YgC6X5Jnj9HkgXJXxeYiJWTAkWKTo,271
|
469
|
-
meutils/config_utils/config_manager.py,sha256=
|
470
|
-
meutils/config_utils/nacosx.py,sha256=
|
474
|
+
meutils/config_utils/config_manager.py,sha256=RYbyBJHtyZUxm4y_scJ5WYzFvUgwxTy41IEnB8Tj-6g,2012
|
475
|
+
meutils/config_utils/nacosx.py,sha256=5x6WlCvjExaA7R9moBxc3DV9l1oFTtNazC6pObaYjMg,1110
|
471
476
|
meutils/config_utils/lark_utils/__init__.py,sha256=Gf-5Y8uZiqY9jdbfiIboL92MQjOTOo0ZZ245PGxCbaY,297
|
472
477
|
meutils/config_utils/lark_utils/common.py,sha256=WB1VKB3vdYyzqWosp5T-7uBIupNXl1L7SM3Lf5GRaOU,14274
|
473
478
|
meutils/config_utils/lark_utils/demo.py,sha256=3g0Fs7oLaeW75T60gYWMLgyNg1OnfOjfHOno5NxNAio,293
|
474
479
|
meutils/config_utils/lark_utils/x.py,sha256=MlMQGhehP9xMEgetxVCX68XFaosfKoW1JA5cZ3JqN2w,1857
|
475
480
|
meutils/crawlers/__init__.py,sha256=TBU4xA-IOsHV-0yIkW7YXxn_QT7TT8NncqxO7IykEfs,271
|
476
481
|
meutils/data/SimHei.ttf,sha256=-XEnekS5yHP_URkT4XBI2w22ylV-KxudhkeIYFbrILA,10062565
|
477
|
-
meutils/data/VERSION,sha256=
|
482
|
+
meutils/data/VERSION,sha256=8g-FoFS4bFiabfQJ079kgAnlU9X1abUW0amfVFiZQvM,19
|
478
483
|
meutils/data/_FLAG,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
479
484
|
meutils/data/_SUCCESS,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
480
485
|
meutils/data/__init__.py,sha256=Hfwkkxs4zHqKhxht0YrhS566a9P5axtmgNvM5wF8ceQ,243
|
481
486
|
meutils/data/coordinate.py,sha256=VbFtcdho0XG4j-rZD0DgqcIf2_LR2LlbLtfhLXbxiDY,600
|
482
487
|
meutils/data/cowboy-hat-face.webp,sha256=AHi2t-WclDVKWgGEe-oZzI4xKACNlgGWUgd622y0K-E,24814
|
483
488
|
meutils/data/oneapi/FOOTER.md,sha256=UHv39ey2ICocxPoCj-UI_PWyyWxZYLS8zG1inqtWNQ4,448
|
484
|
-
meutils/data/oneapi/NOTICE.md,sha256=
|
489
|
+
meutils/data/oneapi/NOTICE.md,sha256=sFYq6Xtj7ViD2JniX12FKCYzIeT9BibcFolrvG3KS7A,4424
|
485
490
|
meutils/data/oneapi/__init__.py,sha256=cm2Kq2RDXPfdVMWcoBB77bu00zJpTDd21Rgc6bTlhws,398
|
486
491
|
meutils/db/__init__.py,sha256=HR99rqxoFTWXUHDhLVl33tzIn8M86gigHLmEzOKH1Ec,7637
|
487
492
|
meutils/db/mongo.py,sha256=B-B_t939rxtnNGt0PxhivjIUwinmHPzLUpXsjUIaTkQ,2337
|
488
493
|
meutils/db/neo4j.py,sha256=eYd3jP3COWlOFBaF20UXphW67-HwlZ1t0Q34Cp-j6o0,2168
|
489
494
|
meutils/db/orm.py,sha256=dyV8tlVDUw_8tS6uiz_nyPzpNg8UX-ob7zarLVfvvqE,4060
|
490
|
-
meutils/db/redis_db.py,sha256=
|
495
|
+
meutils/db/redis_db.py,sha256=KGUByU-6z4GwVyZMgtHxr6d5b9caToS6wWKxQlSE1uY,2404
|
491
496
|
meutils/decorators/__ai.py,sha256=QAz005-Wa-sp0YUUoelaR1pMbt6hPSBML5j0My6TbEI,1681
|
492
497
|
meutils/decorators/__init__.py,sha256=hgpHo40pfFWYXEnrW74o8W7SIfCD0GHr3gnujBw1hIQ,3284
|
493
498
|
meutils/decorators/cache.py,sha256=-sqhCuiSYZK1UtsRw7bBog19G65O9N27DVTAp_nlBk4,2972
|
@@ -557,6 +562,7 @@ meutils/llm/completions/cp.py,sha256=tGf3umHKXDH0KuTfN7BLr8yAvN6MYWLYR5UVaJkJs0c
|
|
557
562
|
meutils/llm/completions/delilegal.py,sha256=mr53ps7I33SC8Fjy4rma-xoNF-mLgwdZfHgdSOyLtQY,5131
|
558
563
|
meutils/llm/completions/dify.py,sha256=dqL_8uxAp2d8M00pkyh2I30tflwi4pUyX-V6pwe3_BA,3048
|
559
564
|
meutils/llm/completions/kimi.py,sha256=TSkLObebIAb_oivOMq3aKx9qoXcMy611_g2yIKex9eo,1541
|
565
|
+
meutils/llm/completions/oi.py,sha256=DmvzxJfdLA_I3MWcULhFtiUdo90j7V2dLvYvmZ-Tm9U,293
|
560
566
|
meutils/llm/completions/rag.py,sha256=cpQ1aZX2QI1QDfFpODTxWHPYglK6_3qrlUM_KHLBNhc,1112
|
561
567
|
meutils/llm/completions/tryblend.py,sha256=NfVRktn1QiE2k60PzEI-LmKuxZCc7mtL_KlsrVcZg4k,8957
|
562
568
|
meutils/llm/completions/tune.py,sha256=FypfUgsB34t-E9xI6WydJYEk_-phscrLOX1iUCeKb_E,10138
|
@@ -668,7 +674,7 @@ meutils/schemas/playwright_types.py,sha256=zhZd53m1Wg4zlGtq2JM4z7Aon-u_eF6rzs-_T
|
|
668
674
|
meutils/schemas/prodia_types.py,sha256=knh_lzAxMfWMoqAPmvyMweay9PmQmsoQ1X6Mj17ohWg,476
|
669
675
|
meutils/schemas/replicate_types.py,sha256=Todfo-y2Gq1MW8IyEmzz_ZlTxuQ3PvIfiF0KkrmJaYw,3160
|
670
676
|
meutils/schemas/runwayml_types.py,sha256=q6g00kg1PYCDjpw-notgbcUGwRAlIa8kAmU52ZuXyLQ,6128
|
671
|
-
meutils/schemas/siliconflow_types.py,sha256=
|
677
|
+
meutils/schemas/siliconflow_types.py,sha256=pVdeteRQQ3p8u6Lb2VoQawrm3W4m4EM251txSlIpBLo,8595
|
672
678
|
meutils/schemas/step_types.py,sha256=nGTPXZ7RwOF2RTsPBQguLLcIaBxHs4bsZkYa_LalcJ0,648
|
673
679
|
meutils/schemas/suno_types.py,sha256=KTdcwaJNDUFiY8izVJSZdGZgEMb0OhdiRR_dJVN-Cz0,14967
|
674
680
|
meutils/schemas/task_types.py,sha256=pMVRtvPUxb5bMQ9SKn2gzMRUAvTUMTmsPFryrsARgss,4561
|
@@ -683,7 +689,7 @@ meutils/schemas/db/__init__.py,sha256=m1maURVoM6dIW0yt6ELZrZTzULtkHybVOSXtHNJRVI
|
|
683
689
|
meutils/schemas/db/oneapi_types.py,sha256=Jtt1hXRS5C3DHf_wrkjklVcdPllsAFrzvLq9JLuTdtc,2858
|
684
690
|
meutils/schemas/oneapi/__init__.py,sha256=uevbi3QAvFzN9WPbx9bYKTDyKt7P2ueZO6W0nSiD0sk,289
|
685
691
|
meutils/schemas/oneapi/_types.py,sha256=ClvAaNy3SahEN8lL8KEErHTD6HANelXUeKc_3iLfosQ,1488
|
686
|
-
meutils/schemas/oneapi/common.py,sha256=
|
692
|
+
meutils/schemas/oneapi/common.py,sha256=Mqmqe9-YJ-n53DUQHPvdpdTL-_IymYmfp_Cc285_GOI,23011
|
687
693
|
meutils/schemas/oneapi/icons.py,sha256=T7W5gInBJoHe62wzMimbG_UI-wn3_-rmQ1O4O2z-CQY,1089
|
688
694
|
meutils/schemas/oneapi/model_group_info.py,sha256=rGtflYJuFIjk5MsVEvK9JUR4IciX8jfErqeLqf8DIlQ,1586
|
689
695
|
meutils/schemas/oneapi/model_info.py,sha256=_uwKEPIIqm7ZYfhmpxtXB2QNsS83SpJY-OaBzvogC9w,772
|
@@ -810,9 +816,9 @@ meutils/tools/seize.py,sha256=nOKAS63w-Lbi48I0m2MPhdsokUTwxco0laPxYVmW4Mw,1064
|
|
810
816
|
meutils/tools/service_monitor.py,sha256=ibsLtBN2g2DL7ZnLJ8vhiZOiOcqTAyx711djDdBK-3M,1255
|
811
817
|
meutils/tools/sys_monitor.py,sha256=6MoyzrItqDUOSjfHcMJmMofQkEPTW36CT_aKui0rg84,429
|
812
818
|
meutils/tools/token_monitor.py,sha256=Np-YK-R4P4IPAXyZvMxwvXI4sFmNJQAQK1lSegNaYpA,997
|
813
|
-
MeUtils-2024.12.
|
814
|
-
MeUtils-2024.12.
|
815
|
-
MeUtils-2024.12.
|
816
|
-
MeUtils-2024.12.
|
817
|
-
MeUtils-2024.12.
|
818
|
-
MeUtils-2024.12.
|
819
|
+
MeUtils-2024.12.12.17.3.48.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
820
|
+
MeUtils-2024.12.12.17.3.48.dist-info/METADATA,sha256=7JmZT3tBmD0XxNWam8VAcbhvmHIYjNbvy3rc5jZR_1Q,6170
|
821
|
+
MeUtils-2024.12.12.17.3.48.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
822
|
+
MeUtils-2024.12.12.17.3.48.dist-info/entry_points.txt,sha256=lufZlBHRqqZKdY-ZQJ4CSZb0qhV5hQC37egZna9M7ug,357
|
823
|
+
MeUtils-2024.12.12.17.3.48.dist-info/top_level.txt,sha256=cInfxMmkgNOskurdjwP5unau4rA7Uw48nu07tYhS7KY,22
|
824
|
+
MeUtils-2024.12.12.17.3.48.dist-info/RECORD,,
|
@@ -12,8 +12,8 @@ from meutils.pipe import *
|
|
12
12
|
|
13
13
|
from openai import OpenAI
|
14
14
|
|
15
|
-
base_url = "https://api.chatllm.vip/v1"
|
16
|
-
base_url = "http://0.0.0.0:8000/v1"
|
15
|
+
# base_url = "https://api.chatllm.vip/v1"
|
16
|
+
# base_url = "http://0.0.0.0:8000/v1"
|
17
17
|
# base_url="https://api.gptgod.online/v1"
|
18
18
|
|
19
19
|
|
@@ -21,7 +21,7 @@ from openai import OpenAI
|
|
21
21
|
|
22
22
|
|
23
23
|
client = OpenAI(
|
24
|
-
api_key=os.getenv('OPENAI_API_KEY_OPENAI'),
|
24
|
+
# api_key=os.getenv('OPENAI_API_KEY_OPENAI'),
|
25
25
|
)
|
26
26
|
|
27
27
|
with timer('聊天模型'):
|
@@ -44,7 +44,7 @@ with timer('聊天模型'):
|
|
44
44
|
# 'model': '65f41c8a9c0ebbcbe28bb9c1',
|
45
45
|
|
46
46
|
'messages': [
|
47
|
-
{'role': 'system', 'content': '
|
47
|
+
{'role': 'system', 'content': 'You are a helpful assistant designed to output JSON.'},
|
48
48
|
|
49
49
|
{'role': 'user', 'content': "请将1改为2 {'a': 1}"}
|
50
50
|
|
@@ -74,3 +74,5 @@ with timer('聊天模型'):
|
|
74
74
|
# model = 'text-embedding-3-large'
|
75
75
|
# r = client.embeddings.create(input='hi', model=model)
|
76
76
|
# print(r)
|
77
|
+
|
78
|
+
|
@@ -0,0 +1,60 @@
|
|
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
|
+
import os
|
11
|
+
|
12
|
+
from meutils.pipe import *
|
13
|
+
from openai import OpenAI
|
14
|
+
from openai import OpenAI, APIStatusError
|
15
|
+
|
16
|
+
os.getenv("ZHIPUAI_API_KEY")
|
17
|
+
# https://web.aaai.me/api/v1/auths/api_key
|
18
|
+
|
19
|
+
client = OpenAI(
|
20
|
+
base_url="https://web.aaai.me/api",
|
21
|
+
|
22
|
+
api_key="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImMyNWNmZDljLTViMDUtNDk1Ni04NDgzLTg1M2I4MGY4MDg5ZiJ9.Y6S8nnnqxcz6iGLUPNIGeG8h1dq2SCYfH4FqMDpwO9M",
|
23
|
+
)
|
24
|
+
|
25
|
+
print(client.models.list())
|
26
|
+
|
27
|
+
try:
|
28
|
+
completion = client.chat.completions.create(
|
29
|
+
# model="glm-4-flash",
|
30
|
+
# model="claude-3-5-sonnet-20241022",
|
31
|
+
model="gpt-4o",
|
32
|
+
|
33
|
+
messages=[
|
34
|
+
{"role": "user", "content": "讲个故事"}
|
35
|
+
],
|
36
|
+
# top_p=0.7,
|
37
|
+
top_p=None,
|
38
|
+
temperature=None,
|
39
|
+
stream=False,
|
40
|
+
max_tokens=6000
|
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)
|
51
|
+
|
52
|
+
# r = client.images.generate(
|
53
|
+
# model="cogview-3-plus",
|
54
|
+
# prompt="a white siamese cat",
|
55
|
+
# size="1024x1024",
|
56
|
+
# quality="hd",
|
57
|
+
# n=1,
|
58
|
+
# )
|
59
|
+
|
60
|
+
|
@@ -0,0 +1,66 @@
|
|
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
|
+
import os
|
11
|
+
|
12
|
+
from meutils.pipe import *
|
13
|
+
from openai import OpenAI
|
14
|
+
from openai import OpenAI, APIStatusError
|
15
|
+
|
16
|
+
os.getenv("ZHIPUAI_API_KEY")
|
17
|
+
|
18
|
+
client = OpenAI(
|
19
|
+
base_url="https://onehub-proxy.xyyds.workers.dev/v1",
|
20
|
+
# base_url="https://all.chatfire.cc/ld/v1",
|
21
|
+
# base_url="https://api.aicnn.cn/v1",
|
22
|
+
api_key="sk-linuxdovvip",
|
23
|
+
# api_key="fdadb5b1088115cb5311c3a74b9ea6ae.9CXVP3fr4UIPNYMO",
|
24
|
+
# base_url="https://open.bigmodel.cn/api/paas/v4/"
|
25
|
+
|
26
|
+
# api_key="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI3YmFmYWQzYTRmZDU0OTk3YjNmYmNmYjExMjY5NThmZiIsImV4cCI6MTczODAyNDg4MiwibmJmIjoxNzIyNDcyODgyLCJpYXQiOjE3MjI0NzI4ODIsImp0aSI6IjY5Y2ZiNzgzNjRjODQxYjA5Mjg1OTgxYmY4ODMzZDllIiwidWlkIjoiNjVmMDc1Y2E4NWM3NDFiOGU2ZmRjYjEyIiwidHlwZSI6InJlZnJlc2gifQ.u9pIfuQZ7Y00DB6x3rbWYomwQGEyYDSE-814k67SH74",
|
27
|
+
# base_url="https://any2chat.chatfire.cn/glm/v1"
|
28
|
+
|
29
|
+
|
30
|
+
# api_key="sk-gSpjKUijyR9jC6u9V7ALWnBvZVRPh8wUMVl0WJEB0etBtQpf",
|
31
|
+
)
|
32
|
+
|
33
|
+
print(client.models.list())
|
34
|
+
|
35
|
+
try:
|
36
|
+
completion = client.chat.completions.create(
|
37
|
+
# model="glm-4-flash",
|
38
|
+
# model="claude-3-5-sonnet-20241022",
|
39
|
+
model="gpt-4o",
|
40
|
+
|
41
|
+
messages=[
|
42
|
+
{"role": "user", "content": "讲个故事"}
|
43
|
+
],
|
44
|
+
# top_p=0.7,
|
45
|
+
top_p=None,
|
46
|
+
temperature=None,
|
47
|
+
stream=False,
|
48
|
+
max_tokens=6000
|
49
|
+
)
|
50
|
+
except APIStatusError as e:
|
51
|
+
print(e.status_code)
|
52
|
+
|
53
|
+
print(e.response)
|
54
|
+
print(e.message)
|
55
|
+
print(e.code)
|
56
|
+
|
57
|
+
for chunk in completion:
|
58
|
+
print(chunk.choices[0].delta.content)
|
59
|
+
|
60
|
+
# r = client.images.generate(
|
61
|
+
# model="cogview-3-plus",
|
62
|
+
# prompt="a white siamese cat",
|
63
|
+
# size="1024x1024",
|
64
|
+
# quality="hd",
|
65
|
+
# n=1,
|
66
|
+
# )
|
@@ -13,41 +13,44 @@ from meutils.pipe import *
|
|
13
13
|
from openai import OpenAI
|
14
14
|
from openai import OpenAI, APIStatusError
|
15
15
|
|
16
|
+
os.getenv("ZHIPUAI_API_KEY")
|
17
|
+
|
16
18
|
client = OpenAI(
|
17
|
-
|
19
|
+
base_url="https://free.chatfire.cn/v1"
|
20
|
+
# api_key="fdadb5b1088115cb5311c3a74b9ea6ae.9CXVP3fr4UIPNYMO",
|
18
21
|
# base_url="https://open.bigmodel.cn/api/paas/v4/"
|
19
22
|
|
20
|
-
api_key="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI3YmFmYWQzYTRmZDU0OTk3YjNmYmNmYjExMjY5NThmZiIsImV4cCI6MTczODAyNDg4MiwibmJmIjoxNzIyNDcyODgyLCJpYXQiOjE3MjI0NzI4ODIsImp0aSI6IjY5Y2ZiNzgzNjRjODQxYjA5Mjg1OTgxYmY4ODMzZDllIiwidWlkIjoiNjVmMDc1Y2E4NWM3NDFiOGU2ZmRjYjEyIiwidHlwZSI6InJlZnJlc2gifQ.u9pIfuQZ7Y00DB6x3rbWYomwQGEyYDSE-814k67SH74",
|
21
|
-
base_url="https://any2chat.chatfire.cn/glm/v1"
|
23
|
+
# api_key="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI3YmFmYWQzYTRmZDU0OTk3YjNmYmNmYjExMjY5NThmZiIsImV4cCI6MTczODAyNDg4MiwibmJmIjoxNzIyNDcyODgyLCJpYXQiOjE3MjI0NzI4ODIsImp0aSI6IjY5Y2ZiNzgzNjRjODQxYjA5Mjg1OTgxYmY4ODMzZDllIiwidWlkIjoiNjVmMDc1Y2E4NWM3NDFiOGU2ZmRjYjEyIiwidHlwZSI6InJlZnJlc2gifQ.u9pIfuQZ7Y00DB6x3rbWYomwQGEyYDSE-814k67SH74",
|
24
|
+
# base_url="https://any2chat.chatfire.cn/glm/v1"
|
22
25
|
)
|
23
26
|
|
24
|
-
|
25
|
-
|
26
|
-
#
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
#
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
r = client.images.generate(
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
)
|
27
|
+
try:
|
28
|
+
completion = client.chat.completions.create(
|
29
|
+
# model="glm-4-flash",
|
30
|
+
model="xxxxxxxxxxxxx",
|
31
|
+
messages=[
|
32
|
+
{"role": "user", "content": "讲个故事"}
|
33
|
+
],
|
34
|
+
# top_p=0.7,
|
35
|
+
top_p=None,
|
36
|
+
temperature=None,
|
37
|
+
stream=True,
|
38
|
+
max_tokens=6000
|
39
|
+
)
|
40
|
+
except APIStatusError as e:
|
41
|
+
print(e.status_code)
|
42
|
+
|
43
|
+
print(e.response)
|
44
|
+
print(e.message)
|
45
|
+
print(e.code)
|
46
|
+
|
47
|
+
for chunk in completion:
|
48
|
+
print(chunk.choices[0].delta.content)
|
49
|
+
|
50
|
+
# r = client.images.generate(
|
51
|
+
# model="cogview-3-plus",
|
52
|
+
# prompt="a white siamese cat",
|
53
|
+
# size="1024x1024",
|
54
|
+
# quality="hd",
|
55
|
+
# n=1,
|
56
|
+
# )
|
@@ -19,20 +19,31 @@ cache = hermes.Hermes(
|
|
19
19
|
db=1,
|
20
20
|
)
|
21
21
|
|
22
|
-
hermes.Serialiser
|
23
|
-
|
24
22
|
|
23
|
+
# hermes.Serialiser
|
24
|
+
#
|
25
|
+
# cache.mangler.serialiser = hermes.Serialiser(
|
26
|
+
# msgpack.dumps, lambda b: msgpack.loads(b, strict_map_key = False)
|
27
|
+
# )
|
25
28
|
@cache
|
26
29
|
def foo(a, b):
|
27
30
|
return a * b
|
28
31
|
|
29
|
-
|
32
|
+
|
33
|
+
@cache(ttl=10)
|
30
34
|
async def func(x):
|
31
35
|
await asyncio.sleep(5)
|
32
36
|
logger.debug('异步函数')
|
33
37
|
return x
|
34
38
|
|
35
39
|
|
40
|
+
@cache(tags=('math', 'avg'), key=lambda fn, a, b: f'avg:{a}') # 这样可以忽略b
|
41
|
+
async def func_ignore(a, b):
|
42
|
+
await asyncio.sleep(5)
|
43
|
+
logger.debug('异步函数')
|
44
|
+
return a, b
|
45
|
+
|
46
|
+
|
36
47
|
class Example:
|
37
48
|
|
38
49
|
@cache(tags=('math', 'power'), ttl=1200)
|
@@ -44,18 +55,18 @@ class Example:
|
|
44
55
|
return (a + b) / 2
|
45
56
|
|
46
57
|
|
47
|
-
print(foo(2, 333))
|
48
|
-
|
49
|
-
example = Example()
|
50
|
-
print(example.bar(2, 10))
|
51
|
-
print(example.baz(2, 10))
|
52
|
-
|
53
|
-
foo.invalidate(2, 333)
|
54
|
-
example.bar.invalidate(2, 10)
|
55
|
-
example.baz.invalidate(2, 10)
|
56
|
-
|
57
|
-
cache.clean(['math']) # invalidate entries tagged 'math'
|
58
|
-
cache.clean() # flush cache
|
58
|
+
# print(foo(2, 333))
|
59
|
+
#
|
60
|
+
# example = Example()
|
61
|
+
# print(example.bar(2, 10))
|
62
|
+
# print(example.baz(2, 10))
|
63
|
+
#
|
64
|
+
# foo.invalidate(2, 333)
|
65
|
+
# example.bar.invalidate(2, 10)
|
66
|
+
# example.baz.invalidate(2, 10)
|
67
|
+
#
|
68
|
+
# cache.clean(['math']) # invalidate entries tagged 'math'
|
69
|
+
# cache.clean() # flush cache
|
59
70
|
|
60
71
|
|
61
72
|
if __name__ == '__main__':
|
@@ -64,4 +75,7 @@ if __name__ == '__main__':
|
|
64
75
|
|
65
76
|
class Config:
|
66
77
|
frozen = True
|
67
|
-
|
78
|
+
|
79
|
+
|
80
|
+
arun(func(1))
|
81
|
+
# arun(func_ignore(1, 11))
|
@@ -78,5 +78,7 @@ async def get_task(task_id, api_key):
|
|
78
78
|
|
79
79
|
# VideoResult
|
80
80
|
if __name__ == '__main__':
|
81
|
-
|
81
|
+
|
82
|
+
api_key = "e21bd630f681c4d90b390cd609720483.WSFVgA3Kk1wNCX0mN"
|
83
|
+
r = arun(create_task(VideoRequest(), api_key=api_key))
|
82
84
|
pass
|
meutils/apis/hailuoai/videos.py
CHANGED
@@ -347,13 +347,12 @@ async def check_token(token, threshold: int = 30, **kwargs):
|
|
347
347
|
if not isinstance(token, str):
|
348
348
|
return await check_tokens(token, check_token)
|
349
349
|
|
350
|
-
token = await get_access_token(token)
|
351
|
-
print(token)
|
352
|
-
headers = {
|
353
|
-
"token": token
|
354
|
-
}
|
355
|
-
params = {}
|
356
350
|
try:
|
351
|
+
token = await get_access_token(token)
|
352
|
+
headers = {
|
353
|
+
"token": token
|
354
|
+
}
|
355
|
+
params = {}
|
357
356
|
async with httpx.AsyncClient(base_url=BASE_URL, headers=headers, timeout=60) as client:
|
358
357
|
response = await client.get("/v1/api/user/equity", params=params)
|
359
358
|
response.raise_for_status()
|
meutils/apis/search/metaso.py
CHANGED
@@ -132,7 +132,7 @@ async def create(request: ChatCompletionRequest, response_format: Optional[str]
|
|
132
132
|
}
|
133
133
|
|
134
134
|
pattern = re.compile('\[\[(\d+)\]\]')
|
135
|
-
async with httpx.AsyncClient(base_url=BASE_URL, headers=headers, params=params,
|
135
|
+
async with httpx.AsyncClient(base_url=BASE_URL, headers=headers, params=params, proxy=proxy) as client:
|
136
136
|
async with client.stream(method="GET", url="/api/searchV2") as response:
|
137
137
|
response.raise_for_status()
|
138
138
|
logger.debug(response.status_code)
|
@@ -29,11 +29,13 @@ BASE_URL = os.getenv("SILICONFLOW_BASE_URL")
|
|
29
29
|
DEFAULT_MODEL = "black-forest-labs/FLUX.1-schnell"
|
30
30
|
MODELS = {
|
31
31
|
|
32
|
+
|
32
33
|
"flux.1-schnell": "black-forest-labs/FLUX.1-schnell",
|
33
34
|
"flux.1-dev": "black-forest-labs/FLUX.1-dev",
|
34
35
|
"flux.1-pro": "black-forest-labs/FLUX.1-dev",
|
35
36
|
"flux.1.1-pro": "black-forest-labs/FLUX.1-dev",
|
36
37
|
"flux-1.1-pro": "black-forest-labs/FLUX.1-dev", # replicate
|
38
|
+
"flux1.1-pro": "black-forest-labs/FLUX.1-dev",
|
37
39
|
|
38
40
|
"flux.1-pro-max": "black-forest-labs/FLUX.1-dev",
|
39
41
|
|
@@ -125,7 +127,12 @@ if __name__ == '__main__':
|
|
125
127
|
"seed": None
|
126
128
|
}
|
127
129
|
|
128
|
-
|
130
|
+
data = {'model': 'flux1.1-pro',
|
131
|
+
'prompt': 'Surrealism, Chinese art, fairy, close-up of the upper body, hazy, glowing, dreamy, light pink and light blue gradient long hair, beautiful and charming, dressed in cashmere-like clothing, streamlined design, elegant, fair-skinned and beautiful, delicate features, comfortable, lying on an ice blue bed, background of a crescent moon and starry sky, with a touch of romantic gifts, virtual engine rendering, 3D model, OC rendering, perfect composition, ultra-detailed details, 3D rendering close-up shot. (flux1.1-pro)',
|
132
|
+
'negative_prompt': '', 'n': 1, 'response_format': 'url', 'size': '1152x2048', 'num_inference_steps': 20,
|
133
|
+
'seed': None}
|
134
|
+
|
135
|
+
# request = FluxImageRequest(model="flux", prompt="a dog", size="1024x1024", num_inference_steps=1)
|
129
136
|
# request = FluxImageRequest(model="flux-pro", prompt="a dog", size="10x10", num_inference_steps=1)
|
130
137
|
request = FluxImageRequest(**data)
|
131
138
|
|
@@ -140,4 +147,4 @@ if __name__ == '__main__':
|
|
140
147
|
# size="576x1024",
|
141
148
|
# )
|
142
149
|
|
143
|
-
|
150
|
+
arun(generate(request))
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
# @Project : AI. @by PyCharm
|
4
|
+
# @File : videos
|
5
|
+
# @Time : 2024/12/12 08:53
|
6
|
+
# @Author : betterme
|
7
|
+
# @WeChat : meutils
|
8
|
+
# @Software : PyCharm
|
9
|
+
# @Description :
|
10
|
+
from meutils.pipe import *
|
11
|
+
from meutils.schemas.siliconflow_types import BASE_URL, VideoRequest
|
12
|
+
from meutils.config_utils.lark_utils import get_next_token_for_polling
|
13
|
+
|
14
|
+
from openai import OpenAI, AsyncOpenAI
|
15
|
+
|
16
|
+
|
17
|
+
async def create_task(request: VideoRequest, token: Optional[str] = None):
|
18
|
+
token = token or await get_next_token_for_polling(FEISHU_URL_FREE)
|
19
|
+
|
20
|
+
payload = request.model_dump(exclude_none=True)
|
21
|
+
|
22
|
+
client = OpenAI(
|
23
|
+
base_url=BASE_URL,
|
24
|
+
api_key=token
|
25
|
+
)
|
26
|
+
|
27
|
+
resp = client.post("/video/submit", cast_to=object, body=payload)
|
28
|
+
return resp # {'requestId': 'e6fdd5d6-288f-45b4-a760-ead691c43ca9'}
|
29
|
+
|
30
|
+
|
31
|
+
if __name__ == '__main__':
|
32
|
+
token = "sk-raapiguffsnsxgkfiwfusjmbpcyqoxhcohhxaybflrnvpqjw"
|
33
|
+
arun(create_task(VideoRequest(model="tencent/HunyuanVideo", prompt="a dog in the forest"), token=token))
|
meutils/cache/hcache.py
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
# @Project : AI. @by PyCharm
|
4
|
+
# @File : redis_cache
|
5
|
+
# @Time : 2024/12/6 10:46
|
6
|
+
# @Author : betterme
|
7
|
+
# @WeChat : meutils
|
8
|
+
# @Software : PyCharm
|
9
|
+
# @Description : https://hermescache.readthedocs.io/en/latest/
|
10
|
+
# https://mp.weixin.qq.com/s/-T2UmkinmtQoNQo4DVpnfw
|
11
|
+
|
12
|
+
|
13
|
+
import hermes.backend.redis
|
14
|
+
|
15
|
+
from meutils.db.redis_db import pool
|
16
|
+
|
17
|
+
cache = hermes.Hermes(
|
18
|
+
backend=hermes.backend.redis.Backend,
|
19
|
+
connection_pool=pool
|
20
|
+
)
|
21
|
+
|
22
|
+
if __name__ == '__main__':
|
23
|
+
from meutils.pipe import *
|
24
|
+
|
25
|
+
|
26
|
+
@cache
|
27
|
+
def foo(a, b):
|
28
|
+
time.sleep(3)
|
29
|
+
logger.debug('没有缓存')
|
30
|
+
|
31
|
+
return a * b
|
32
|
+
|
33
|
+
|
34
|
+
@cache(tags=('test',), key=lambda fn, a, b: f'avg:{a}') # 这样可以忽略b
|
35
|
+
async def func_ignore(a, b):
|
36
|
+
await asyncio.sleep(5)
|
37
|
+
logger.debug('异步函数')
|
38
|
+
return a, b
|
39
|
+
|
40
|
+
|
41
|
+
arun(func_ignore(1, 1))
|
42
|
+
# ttl: Optional[int] = None,
|
43
|
+
# tags: Sequence[str] = (),
|
44
|
+
# key: Optional[Callable] = None,
|
45
|
+
# @cache(ttl=100, key=lambda fn, a, b: (a, b))
|
46
|
+
# def func(x, y):
|
47
|
+
# logger.debug('xxxxxxx')
|
48
|
+
# return x
|
meutils/config_utils/nacosx.py
CHANGED
meutils/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2024.12.
|
1
|
+
2024.12.12.17.03.48
|
meutils/data/oneapi/NOTICE.md
CHANGED
@@ -1,6 +1,36 @@
|
|
1
1
|
<h1 align = "center">🔥公告🚀</h1>
|
2
2
|
|
3
3
|
---
|
4
|
+
<details markdown="1">
|
5
|
+
<summary><b>业务范围</b></summary>
|
6
|
+
|
7
|
+
- api服务(没有的找企微客服增加)
|
8
|
+
- 提供主流大模型服务,gpt/claude/gemini/llama/国产大模型等等
|
9
|
+
- 提供多模态模型服务,文件解析/图片解析/语音解析/视频解析等等
|
10
|
+
- 提供垂类智能体服务,文件问答/联网问答/学术搜索等等
|
11
|
+
- 提供语音克隆&语音合成服务,hailuo/fish/chattts等等
|
12
|
+
- 提供embedding服务,bge/jina/openai等等
|
13
|
+
- 提供图片生成服务,kling/flux/ideogram/recraft/虚拟换衣/换头等等
|
14
|
+
- 提供视频生成服务,kling/cogviewx/hailuo/hunyuan/vidu/sora等等
|
15
|
+
- 提供图片编辑服务,变清晰、去水印、抠图等等
|
16
|
+
- 提供文档智能服务,ocr/pdf-to-markdown/url-to-markdown等等
|
17
|
+
- 提供对象存储服务
|
18
|
+
|
19
|
+
- 账号服务(市面上有的都可以)
|
20
|
+
- gpt-plus/claude-pro
|
21
|
+
- api-key
|
22
|
+
|
23
|
+
- 个性化服务
|
24
|
+
- 定制同款api聚合站点,一键对接货源
|
25
|
+
- 定制企业智能体,类似gpt-4-all/kimi
|
26
|
+
- 定制知识库智能问答(RAG)
|
27
|
+
- 定制AI类网站/小程序等等
|
28
|
+
- 承接数据标注/数据跑批任务
|
29
|
+
- 承接大模型微调,定制化大模型(可端到端)
|
30
|
+
- 承接其他项目,算法模型等等
|
31
|
+
|
32
|
+
</details>
|
33
|
+
|
4
34
|
## 2024-12-09
|
5
35
|
- 新增模型
|
6
36
|
- meta-llama/Llama-3.3-70B-Instruct: Llama 3.3 是 Llama 系列最先进的多语言开源大型语言模型,以极低成本体验媲美 405B 模型的性能。基于 Transformer 结构,并通过监督微调(SFT)和人类反馈强化学习(RLHF)提升有用性和安全性。其指令调优版本专为多语言对话优化,在多项行业基准上表现优于众多开源和封闭聊天模型。知识截止日期为 2023 年 12 月。
|
meutils/db/redis_db.py
CHANGED
@@ -7,14 +7,15 @@
|
|
7
7
|
# @WeChat : meutils
|
8
8
|
# @Software : PyCharm
|
9
9
|
# @Description :
|
10
|
-
from meutils.pipe import *
|
10
|
+
# from meutils.pipe import *
|
11
11
|
|
12
12
|
import os
|
13
13
|
from redis import Redis, ConnectionPool
|
14
14
|
from redis.asyncio import Redis as AsyncRedis, ConnectionPool as AsyncConnectionPool
|
15
15
|
|
16
16
|
kwargs = {
|
17
|
-
"retry_on_timeout": True
|
17
|
+
"retry_on_timeout": True,
|
18
|
+
# "db": 6
|
18
19
|
}
|
19
20
|
if REDIS_URL := os.getenv("REDIS_URL"):
|
20
21
|
# logger.debug(REDIS_URL)
|
@@ -28,6 +29,8 @@ if REDIS_URL := os.getenv("REDIS_URL"):
|
|
28
29
|
# redis_aclient = AsyncRedis.from_url(REDIS_URL, **kwargs)
|
29
30
|
|
30
31
|
|
32
|
+
|
33
|
+
|
31
34
|
else:
|
32
35
|
redis_client = Redis(**kwargs) # decode_responses=True
|
33
36
|
redis_aclient = AsyncRedis(**kwargs)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
# @Project : AI. @by PyCharm
|
4
|
+
# @File : oi
|
5
|
+
# @Time : 2024/12/12 13:19
|
6
|
+
# @Author : betterme
|
7
|
+
# @WeChat : meutils
|
8
|
+
# @Software : PyCharm
|
9
|
+
# @Description :
|
10
|
+
|
11
|
+
from meutils.pipe import *
|
12
|
+
|
13
|
+
|
14
|
+
from openai import OpenAI
|
15
|
+
|
16
|
+
|
meutils/schemas/oneapi/common.py
CHANGED
@@ -54,9 +54,13 @@ MODEL_PRICE = {
|
|
54
54
|
"api-images-flux-schnell": 0.01,
|
55
55
|
"api-images-flux1.0-schnell": 0.01,
|
56
56
|
"api-images-flux1.0-dev": 0.05,
|
57
|
+
"api-images-flux.1-dev": 0.05,
|
58
|
+
|
57
59
|
"api-images-flux-pro-max": 0.1,
|
58
60
|
"api-images-flux1.0-pro": 0.1,
|
61
|
+
"api-images-flux.1-pro": 0.1,
|
59
62
|
"api-images-flux1.1-pro": 0.1,
|
63
|
+
"api-images-flux.1.1-pro": 0.1,
|
60
64
|
"api-images-recraftv3": 0.03,
|
61
65
|
|
62
66
|
"api-tripo3d": 0.1,
|
@@ -203,16 +207,12 @@ MODEL_PRICE = {
|
|
203
207
|
"chat-stable-diffusion-3": 0.02,
|
204
208
|
|
205
209
|
# 搜索
|
206
|
-
"
|
210
|
+
"ai-search": 0.01,
|
211
|
+
"ai-search:scholar": 0.01,
|
207
212
|
|
208
|
-
# "ai-search": 0.05,
|
209
213
|
"ai-search-pro": 0.1,
|
210
|
-
# "ai-search:scholar": 0.05,
|
211
214
|
"ai-search-pro:scholar": 0.1,
|
212
215
|
|
213
|
-
"ai-search": FREE,
|
214
|
-
"ai-search:scholar": FREE,
|
215
|
-
|
216
216
|
"midjourney": 0.14, # chat
|
217
217
|
|
218
218
|
"mj_imagine": 0.1 * 0.6,
|
@@ -623,7 +623,7 @@ COMPLETION_RATIO = {
|
|
623
623
|
"qwen-turbo-2024-11-01": 3,
|
624
624
|
"qwen/qwq-32b-preview": 2,
|
625
625
|
"Qwen/QwQ-32B-Preview": 2,
|
626
|
-
"qwq-32b-preview":2,
|
626
|
+
"qwq-32b-preview": 2,
|
627
627
|
"qwen-long": 5,
|
628
628
|
"qwen-max": 5,
|
629
629
|
"glm-4v-flash": 5,
|
meutils/cache/redis_cache.py
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
# @Project : AI. @by PyCharm
|
4
|
-
# @File : redis_cache
|
5
|
-
# @Time : 2024/12/6 10:46
|
6
|
-
# @Author : betterme
|
7
|
-
# @WeChat : meutils
|
8
|
-
# @Software : PyCharm
|
9
|
-
# @Description : https://hermescache.readthedocs.io/en/latest/
|
10
|
-
# https://mp.weixin.qq.com/s/-T2UmkinmtQoNQo4DVpnfw
|
11
|
-
|
12
|
-
from meutils.pipe import *
|
13
|
-
|
14
|
-
import hermes.backend.redis
|
15
|
-
|
16
|
-
cache = hermes.Hermes(
|
17
|
-
hermes.backend.redis.Backend,
|
18
|
-
ttl=600,
|
19
|
-
host='localhost',
|
20
|
-
db=1,
|
21
|
-
)
|
22
|
-
|
23
|
-
if __name__ == '__main__':
|
24
|
-
pass
|
25
|
-
|
26
|
-
|
27
|
-
# ttl: Optional[int] = None,
|
28
|
-
# tags: Sequence[str] = (),
|
29
|
-
# key: Optional[Callable] = None,
|
30
|
-
@cache(ttl=100, key=lambda fn, a, b: (a, b))
|
31
|
-
def func(x, y):
|
32
|
-
logger.debug('xxxxxxx')
|
33
|
-
return x
|
File without changes
|
File without changes
|
{MeUtils-2024.12.9.17.20.54.dist-info → MeUtils-2024.12.12.17.3.48.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|