MeUtils 2024.12.13.15.39.7__py3-none-any.whl → 2024.12.19.9.30.53__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MeUtils
3
- Version: 2024.12.13.15.39.7
3
+ Version: 2024.12.19.9.30.53
4
4
  Summary: description
5
5
  Home-page: https://github.com/yuanjie-ai/MeUtils
6
6
  Author: yuanjie
@@ -63,42 +63,42 @@ Requires-Dist: sse-starlette ; extra == 'ai'
63
63
  Requires-Dist: openai ; extra == 'ai'
64
64
  Requires-Dist: langchain ; extra == 'ai'
65
65
  Provides-Extra: all
66
- Requires-Dist: gunicorn ; extra == 'all'
67
- Requires-Dist: seaborn ; extra == 'all'
68
- Requires-Dist: langchain ; extra == 'all'
69
- Requires-Dist: cachetools ; extra == 'all'
70
- Requires-Dist: jmespath ; extra == 'all'
71
- Requires-Dist: pretty-errors ; extra == 'all'
72
66
  Requires-Dist: filetype ; extra == 'all'
67
+ Requires-Dist: missingno ; extra == 'all'
68
+ Requires-Dist: streamlit ; extra == 'all'
69
+ Requires-Dist: dataframe-image ; extra == 'all'
70
+ Requires-Dist: openai ; extra == 'all'
71
+ Requires-Dist: thefuck ; extra == 'all'
72
+ Requires-Dist: seaborn ; extra == 'all'
73
+ Requires-Dist: pyarrow ; extra == 'all'
73
74
  Requires-Dist: pandas-summary ; extra == 'all'
75
+ Requires-Dist: pymongo ; extra == 'all'
76
+ Requires-Dist: polars ; extra == 'all'
77
+ Requires-Dist: schedule ; extra == 'all'
78
+ Requires-Dist: langchain ; extra == 'all'
74
79
  Requires-Dist: pandas-profiling[notebook] ; extra == 'all'
75
80
  Requires-Dist: sse-starlette ; extra == 'all'
76
- Requires-Dist: streamlit ; extra == 'all'
77
- Requires-Dist: schedule ; extra == 'all'
78
- Requires-Dist: missingno ; extra == 'all'
79
- Requires-Dist: faiss-cpu ; extra == 'all'
80
- Requires-Dist: iteration-utilities ; extra == 'all'
81
+ Requires-Dist: pretty-errors ; extra == 'all'
82
+ Requires-Dist: uvicorn ; extra == 'all'
81
83
  Requires-Dist: geopy ; extra == 'all'
82
- Requires-Dist: thriftpy2 ; extra == 'all'
83
- Requires-Dist: pyarrow ; extra == 'all'
84
- Requires-Dist: simplejson ; extra == 'all'
85
- Requires-Dist: fastapi[all] ; extra == 'all'
86
- Requires-Dist: redis-py-cluster ; extra == 'all'
87
- Requires-Dist: pymongo ; extra == 'all'
88
- Requires-Dist: sqlalchemy ; extra == 'all'
89
- Requires-Dist: thefuck ; extra == 'all'
90
- Requires-Dist: jieba ; extra == 'all'
91
84
  Requires-Dist: pymupd ; extra == 'all'
92
- Requires-Dist: uvicorn ; extra == 'all'
93
- Requires-Dist: openai ; extra == 'all'
94
- Requires-Dist: asyncmy ; extra == 'all'
95
- Requires-Dist: jinja2 ; extra == 'all'
96
- Requires-Dist: reportlab ; extra == 'all'
97
85
  Requires-Dist: pymilvus ; extra == 'all'
98
- Requires-Dist: dataframe-image ; extra == 'all'
99
- Requires-Dist: polars ; extra == 'all'
100
86
  Requires-Dist: pymysql ; extra == 'all'
87
+ Requires-Dist: fastapi[all] ; extra == 'all'
88
+ Requires-Dist: jmespath ; extra == 'all'
89
+ Requires-Dist: faiss-cpu ; extra == 'all'
90
+ Requires-Dist: simplejson ; extra == 'all'
101
91
  Requires-Dist: fastapi ; extra == 'all'
92
+ Requires-Dist: asyncmy ; extra == 'all'
93
+ Requires-Dist: reportlab ; extra == 'all'
94
+ Requires-Dist: redis-py-cluster ; extra == 'all'
95
+ Requires-Dist: gunicorn ; extra == 'all'
96
+ Requires-Dist: jieba ; extra == 'all'
97
+ Requires-Dist: jinja2 ; extra == 'all'
98
+ Requires-Dist: thriftpy2 ; extra == 'all'
99
+ Requires-Dist: cachetools ; extra == 'all'
100
+ Requires-Dist: iteration-utilities ; extra == 'all'
101
+ Requires-Dist: sqlalchemy ; extra == 'all'
102
102
  Provides-Extra: ann
103
103
  Requires-Dist: pymilvus ; extra == 'ann'
104
104
  Requires-Dist: faiss-cpu ; extra == 'ann'
@@ -69,7 +69,7 @@ examples/Time-Extractor/TimeUnit.py,sha256=yx-SS9sxSjSUGiu1H8eTbP4vqAHrNyQcddioM
69
69
  examples/Time-Extractor/__init__.py,sha256=hjNi8tWPOBTke6GHlxpsOrufCRdAHmYs2yBquql9X7c,156
70
70
  examples/Time-Extractor/setup.py,sha256=ENYhj1_uJ7z_F3jrz8FR8w5u2SEXrZpl5GXEELUymLk,811
71
71
  examples/Time-Extractor/resource/__init__.py,sha256=0HHkZVghckIg5LkGMziooZ8TUqfSQFA6j62BN9KyFp0,91
72
- examples/_openaisdk/4v.py,sha256=7UiLgHjwT2hiV39hE_XWWAxBc_67qQsw9SnAZ2rtEHU,3305
72
+ examples/_openaisdk/4v.py,sha256=sLswURqeNTIVcSIVYIwBOQ8iya8h8b64jEJHQeTClJY,3338
73
73
  examples/_openaisdk/__init__.py,sha256=5TNibGR-ETncXVWoevqYJ0m2yo1GOxRx3hSu2qWAQNo,271
74
74
  examples/_openaisdk/baichuan.py,sha256=xmNFc64T02r9wE0VSOG0B21wJJmlrecKVVCelhs2Dt4,890
75
75
  examples/_openaisdk/bpo.py,sha256=7Jw16TiKFEQvYbt4g-h7QimLBw7xY49w1MthT5OwcTM,5267
@@ -80,18 +80,18 @@ examples/_openaisdk/dalle3.py,sha256=3W12FOSxBdYz2TTW6GM_ZrY0dVpyaVDKrko2HazQUMI
80
80
  examples/_openaisdk/deeplx.py,sha256=RIOMGTZ6McHyH7UCCD3nPMq6qFtHd6f-sXnapH1iGBM,772
81
81
  examples/_openaisdk/demo.py,sha256=3R8DmwR7BhY844hGLEuVqECm2N29gJmQzYGVNdvLlDc,1875
82
82
  examples/_openaisdk/embeddings.py,sha256=ZnktOqp2G_mCigN8K8wHrAhmTYql2PN3pKqaYMLbTW8,851
83
- examples/_openaisdk/gpt4all.py,sha256=bGeHS0IXJdZrW7lOuw0jAi8BCQ8n1EQ4mQ4UszA7A6c,1743
83
+ examples/_openaisdk/gpt4all.py,sha256=ZObvmO5pA0dmGRKNGqJVwzh8q2cd35rQB0HBz5EWM7s,1738
84
84
  examples/_openaisdk/gpt_fc.py,sha256=zcbTWiOA9NQDrk2Yx7xGvod0ch3SxQ6mKBcz-JljhM0,538
85
85
  examples/_openaisdk/gr_vl.py,sha256=1xdzM45fgdE6MitvNPIKuxnHUCnozuJH6KTYmx_0fLA,1672
86
86
  examples/_openaisdk/json_mode.py,sha256=uwGYJ1twz5npeeZ1FEb6l-U-Uk3Tp5O6G6niCdSYbd8,271
87
87
  examples/_openaisdk/kimi.py,sha256=C3jqK4FipcHkGtaeu5mCchg0d2YKBLCUtm0f3ea2qLY,4082
88
88
  examples/_openaisdk/kimi_qa.py,sha256=dNBIe01vK7p-8cFnbgVXJ5H3xPSW32-cc0rwZx3K_1g,1526
89
89
  examples/_openaisdk/minimax.py,sha256=zOshBkL1bHgRlj4z6k2FQRScNTr7ysZkfh2-OaAynkU,2116
90
- examples/_openaisdk/open_router.py,sha256=6_xrvOfSF0kat8V43wUhczAukix4O90pBXnGm4vjAq4,1410
90
+ examples/_openaisdk/open_router.py,sha256=Z4i_FJIc773JnIdYA3Hhuy1Dq5-DIOIrmkWwbp82hJE,1460
91
91
  examples/_openaisdk/openai_audio.py,sha256=ZyYslH9RfdJBpNUpjKn_5x0d94_H291Qt31u_6weISc,484
92
92
  examples/_openaisdk/openai_baichuan.py,sha256=SO8TrwO1aKl6EtUGa9ul-_Sc2udmCJDmjG_KrMBvkMw,1410
93
93
  examples/_openaisdk/openai_cache.py,sha256=89GbJ1QlqQbVxlUeuFgEbwDYHOkum7BK0zB-CqmDAZU,726
94
- examples/_openaisdk/openai_chatfire.py,sha256=x_YYgf3tYclickltbpdygTteZDYV55iPmwYFGPxEA6o,16958
94
+ examples/_openaisdk/openai_chatfire.py,sha256=InT65qjrWflYnXW4SaZJ4lnUENta4ftcmqxJso-SnyI,17110
95
95
  examples/_openaisdk/openai_chatfire_all.py,sha256=DaiI1NfDeK655QvXyczkgXK9Awxp7NBe71LHA7trxGE,4831
96
96
  examples/_openaisdk/openai_deepseek.py,sha256=-1WyTX5EfB8bdVhZ-y2yZQ04fVzujp4OPmOQR6i3QxI,660
97
97
  examples/_openaisdk/openai_doubao.py,sha256=dp0SLvDBYpIJPNs_vnV2GBIEFa9FglNtYvfGKtJ9Bqk,1053
@@ -141,6 +141,7 @@ examples/cache_demo/demo.py,sha256=iGuQTfV23eqtGIB8QqfQYa7qRNGPxqkUNAcws-fsh60,2
141
141
  examples/cache_demo/test.py,sha256=gWY_oMf76RSqXdTHGOCcd-7cObkw8X1hovSVPHeyjkk,427
142
142
  examples/cache_demo/x.py,sha256=ielCUSofFr2KryPtchZaql2Thyfy6TKizM9EnqN2eS4,591
143
143
  examples/caches/__init__.py,sha256=vUpPT-UpH1mFDO2gv5mI7hACcBJYMiIgmb2r4Pr2yUo,271
144
+ examples/caches/llmcache.py,sha256=RwWO1987AINrNE6HslhHhTdhY8A8T9UhtYtlOyNk8cw,370
144
145
  examples/celery_demo/__init__.py,sha256=d3jEYE9LZjFyMly5Djp5vVMlDcmWL5IE6vQoK-tVgK0,271
145
146
  examples/celery_demo/producer.py,sha256=py3Tjcb140zc5mzOGbxf2QIV6ZsXLPX1gjOnHXGysvk,342
146
147
  examples/celery_demo/product_task.py,sha256=4N-sBDtdbb3kneg0zBHB9nlNv-fZltDZOwI1bRAf8AE,382
@@ -326,7 +327,7 @@ meutils/apis/hailuoai/demo.py,sha256=WTnDFL2HgVpAjcn5BljLrbf2y2aATkvvNy75zoEIQkc
326
327
  meutils/apis/hailuoai/hasha_new.py,sha256=1sD3fxmxYrEufmPaJZGAkYJoHKO85hfLXemnY-xYIO8,9101
327
328
  meutils/apis/hailuoai/music.py,sha256=S_oi-ZDbocTfbRgREdXtGx50xzUc1PCZGuxmr917E7M,265
328
329
  meutils/apis/hailuoai/upload.py,sha256=22S6W6hGQhUquVKqh7QCkXb6KHDl3iMKKi6Z0AJdFEI,6501
329
- meutils/apis/hailuoai/videos.py,sha256=TBcYMukzdyrMCdt0ucbSE6UayyOvI29JCa9usvfAkPs,19330
330
+ meutils/apis/hailuoai/videos.py,sha256=YpLMLxBwO93Y2Hqxev0m49g4urahkvQ8YfG92u1vsMM,19334
330
331
  meutils/apis/hailuoai/yy.py,sha256=gJvr7VDa0YPEUkZuETdmCFWWheylDPoMUg8gbS_SVw8,8937
331
332
  meutils/apis/hf/__init__.py,sha256=ZZoRl8yNYekoMhE__67XXBKNSYJaLgjtaa0netjJKUU,271
332
333
  meutils/apis/hf/got_ocr.py,sha256=pZURFpryDh_Ak6PNiARztOzYgkjVrfScJ5-0XzMBrzI,1776
@@ -344,7 +345,7 @@ meutils/apis/images/deepinfra.py,sha256=N7IDJ9dubojOY--R30uQlzSBbuuy4OXkCkRB1ey0
344
345
  meutils/apis/images/demo.py,sha256=Cjk-EKMKbp44czykW_44qR0TzElX8nNCALqXBBw5sJA,4405
345
346
  meutils/apis/images/recraft.py,sha256=fqSXLuyhoy6u1uEwvGl0CISOHab_wVLWVdX3NFziamM,10140
346
347
  meutils/apis/images/fal/__init__.py,sha256=A7w3ZAS7Tv20N4X4Em6NshDxKSCPAzaPxHJTbM3BbyM,272
347
- meutils/apis/images/fal/files.py,sha256=hxcetu8Mcdp-UICh-CF7LuTLFShvGMwgKHxpHyFGj28,1318
348
+ meutils/apis/images/fal/files.py,sha256=Gppdo96uw8-TCDr8P691jV7dK9Si-E-kJXFJR5BVt-Q,1373
348
349
  meutils/apis/images/fal/images.py,sha256=VdobSRcMuU32Q1dEdTJCy68oXTjomz-yzLLLVE2F7WM,1774
349
350
  meutils/apis/images/fal/images_.py,sha256=C-C1TTQtMJ6RRcd-4FeYPn0R5IpPRPUFmBbrTVs_ypA,1446
350
351
  meutils/apis/images/flux/__init__.py,sha256=W_PZabQm6EmtJYmzEiEpL_WCXTAW0AiJ-t_n5UTrE8c,271
@@ -359,6 +360,12 @@ meutils/apis/images/virtual_try_on/images.py,sha256=plELzbJ5yf3zth0XCh8b_dgeRQai
359
360
  meutils/apis/jiema/24mail.py,sha256=GUszRtoDe3T9q-X4embwT5YhcjgQ3XnkTJMKX93sCF4,2595
360
361
  meutils/apis/jiema/__init__.py,sha256=YBybggoDRYCNYcwJOypxR7MzfTjIhqO7BkGlTt7NDo4,271
361
362
  meutils/apis/jiema/yezi.py,sha256=26vhnA3lC5049Rqx-CHO-wyGKbdZAfvjEOG90W38cr0,3675
363
+ meutils/apis/jimeng/__init__.py,sha256=a8CE_cOl9jqal0hycwaLm4Mnga8jmZlz9nCze_9bBqA,272
364
+ meutils/apis/jimeng/common.py,sha256=-3YQGGoWsFyX8XyBfdt1AIF2E7_fGbydi85soKSegbo,8672
365
+ meutils/apis/jimeng/files.py,sha256=0x7lWZha0D6zfGfU3ZOxDdpcbfdax8p7szvRZ6B-Vtk,5200
366
+ meutils/apis/jimeng/images.py,sha256=WQjaetfeFHGoI4hhNHMZxTg32zr2LCwbykgPJchZEn4,3471
367
+ meutils/apis/jimeng/sig.py,sha256=jisL1jCqWEd3PugP4KMZWVQ32OiwwEPFs1jRvxgZmfU,4068
368
+ meutils/apis/jimeng/utils.py,sha256=Ybi2DF1RSXxpxeH387iQGahJhXv5MhYUDtCpPuznP8w,6134
362
369
  meutils/apis/kling/__init__.py,sha256=pKz40SEjui1dhHBD-icyNTJOYhzLvxLxJCwszuH4vio,271
363
370
  meutils/apis/kling/api.py,sha256=AuVQ9URmrbTlz7dEv_kIyhA9fMTZPL9rF3Td6KxTIMA,2183
364
371
  meutils/apis/kling/images.py,sha256=FcCkvA4x1Po3SuugfQa8klT0Lrj7fq4N8kbzx6luUxI,5095
@@ -409,7 +416,7 @@ meutils/apis/siliconflow/images.py,sha256=hmzfSJohweytrL6aX7yy7sYamdlPQFwEF9Q3zH
409
416
  meutils/apis/siliconflow/rerankers.py,sha256=GuKT33MmAiVULqNaAO9IIy1Zp570-kYJ6xP03eLCp5Y,1259
410
417
  meutils/apis/siliconflow/text_to_image.py,sha256=rDxk6NIj4TjigcSPVDZknQR9nUpK5CTJBXc3KjI1Z8Y,4457
411
418
  meutils/apis/siliconflow/utils.py,sha256=Awe0V7Mkceop1vWWrw9901cKQ6HHntIn8HbIG0fEo40,2091
412
- meutils/apis/siliconflow/videos.py,sha256=kYjl8GEbz6gB7sGqXom7biwDiRlKPz9kyGxR1HifDuw,2352
419
+ meutils/apis/siliconflow/videos.py,sha256=sYBxrrI5zMr_4_VXDFpjjiISlJNH4o6eIuZgaDnxvB4,3488
413
420
  meutils/apis/sunoai/__init__.py,sha256=O8J8jKTmvZGGovkF_jCRl3vbL68a4_dXVSxiKIYTkFo,244
414
421
  meutils/apis/sunoai/haimian.py,sha256=CSISElYbbGFnVCxCgAbHM_YZ9ELUjhuFQ6jdYM0hh7E,5521
415
422
  meutils/apis/sunoai/suno.py,sha256=I7UgqkBd7rd8BvOlZqzkf64n7Z2fjw678OnpP5DOKcM,17156
@@ -480,14 +487,14 @@ meutils/config_utils/lark_utils/demo.py,sha256=3g0Fs7oLaeW75T60gYWMLgyNg1OnfOjfH
480
487
  meutils/config_utils/lark_utils/x.py,sha256=MlMQGhehP9xMEgetxVCX68XFaosfKoW1JA5cZ3JqN2w,1857
481
488
  meutils/crawlers/__init__.py,sha256=TBU4xA-IOsHV-0yIkW7YXxn_QT7TT8NncqxO7IykEfs,271
482
489
  meutils/data/SimHei.ttf,sha256=-XEnekS5yHP_URkT4XBI2w22ylV-KxudhkeIYFbrILA,10062565
483
- meutils/data/VERSION,sha256=jcASYOuuxQ5FvqsRAzQmSIeyoDtyfxdeODZI1abYf0E,19
490
+ meutils/data/VERSION,sha256=1nUyP-M5URdGuLyytMxl7mxL-UAHZlHiQuha9wD8f4o,19
484
491
  meutils/data/_FLAG,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
485
492
  meutils/data/_SUCCESS,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
486
493
  meutils/data/__init__.py,sha256=Hfwkkxs4zHqKhxht0YrhS566a9P5axtmgNvM5wF8ceQ,243
487
494
  meutils/data/coordinate.py,sha256=VbFtcdho0XG4j-rZD0DgqcIf2_LR2LlbLtfhLXbxiDY,600
488
495
  meutils/data/cowboy-hat-face.webp,sha256=AHi2t-WclDVKWgGEe-oZzI4xKACNlgGWUgd622y0K-E,24814
489
496
  meutils/data/oneapi/FOOTER.md,sha256=UHv39ey2ICocxPoCj-UI_PWyyWxZYLS8zG1inqtWNQ4,448
490
- meutils/data/oneapi/NOTICE.md,sha256=sFYq6Xtj7ViD2JniX12FKCYzIeT9BibcFolrvG3KS7A,4424
497
+ meutils/data/oneapi/NOTICE.md,sha256=hqdEgCLSePQ5Jni0hG4NlA7T9v7p38LspKnlofCDp-k,3963
491
498
  meutils/data/oneapi/__init__.py,sha256=cm2Kq2RDXPfdVMWcoBB77bu00zJpTDd21Rgc6bTlhws,398
492
499
  meutils/db/__init__.py,sha256=HR99rqxoFTWXUHDhLVl33tzIn8M86gigHLmEzOKH1Ec,7637
493
500
  meutils/db/mongo.py,sha256=B-B_t939rxtnNGt0PxhivjIUwinmHPzLUpXsjUIaTkQ,2337
@@ -545,7 +552,7 @@ meutils/init/__init__.py,sha256=J_ApVNdTQAHsIfSLrMRZhwJ8rdgiOfeyiXGSymvZSng,242
545
552
  meutils/init/evn.py,sha256=z-2SGOL2SzDUdaQMEFpazXNjkyV1CLYGML-rNEZZ5a0,1588
546
553
  meutils/init/oo.py,sha256=jXWaCWWFYVPGgTIas47Z3J7sIq-CD7DyK6fKDBsq8GA,12884
547
554
  meutils/io/__init__.py,sha256=uW43ZfdWu7adRvwvcTzUGtn4CseRmbzEJdlZV-oqHEA,2107
548
- meutils/io/files_utils.py,sha256=Y1Y16QEMslqfqqt5zeEQPIwlwaiMgyGiy30qYq7bphA,6119
555
+ meutils/io/files_utils.py,sha256=KLG4230KhNfdZjhjZJo-jVtbR3RQNpPlp028u8hQUQ4,6979
549
556
  meutils/io/image.py,sha256=lY8vhmf7_5hW5UPh1QjDfeZZOyvSGKDGpJo9k8-s5N4,6136
550
557
  meutils/io/minio_utils.py,sha256=i1YuxwDJzLse0smMXuPqnD1wirBBb8psmB_kd1oPoVU,1274
551
558
  meutils/io/tf_io.py,sha256=vEZZS4pCf4Dt3A-FtIVMfhC3FJUUpQCK2OoEvXrBWos,8605
@@ -556,6 +563,7 @@ meutils/llm/__init__.py,sha256=mYv0QpACLd-wz4htIduPuTU3mX06_Y8ZprxDohtZGBM,244
556
563
  meutils/llm/check_api.py,sha256=Vlan35FGvjPLP-dZu_Gfgmki-G89YPV96-x1oXji79I,3566
557
564
  meutils/llm/check_utils.py,sha256=wA7mHaWEqcN-GBeoqUw2ee_54G-Bht-m1opqZkAEFss,3354
558
565
  meutils/llm/demo.py,sha256=gyGjTxuNFMOa1X4CXaChkq0lcjbKiRsnSRhkeMvsoQk,3822
566
+ meutils/llm/mappers.py,sha256=ZQLl3OuD06kVMP8bwIpVgAB1UVzMJWUJiZ3vgk-ZjeI,303
559
567
  meutils/llm/openai_client.py,sha256=S0ijrWxVt_ABDghhNL0Rg2EUUov8envSMStzxcpg4P4,364
560
568
  meutils/llm/utils.py,sha256=WzNaSuVcCWYukDa14cqgY6d2I5w5KILME11iE0oV2IE,2148
561
569
  meutils/llm/completions/__init__.py,sha256=Z9b0uVj0DuprlPVvLqb-jYf5hk7C1rD-c3fMIQHxVEY,271
@@ -571,7 +579,7 @@ meutils/llm/completions/x.py,sha256=XE8aCyuhkpYq0nho1mq9lAdRU1yOPc8BpvCpNYYMYqM,
571
579
  meutils/llm/completions/xx.py,sha256=pPfVRczvXZFUvAUOAFr0MMHMb5kVPNfKVhOLKugq52M,1646
572
580
  meutils/llm/completions/yuanbao.py,sha256=aN3MwR6yORFv5pGA1ODiLqlNKCfAKQslIfpruAD6m08,5468
573
581
  meutils/llm/completions/rag/__init__.py,sha256=VH4g9H0pqMM1Rkjc1xefQb4Uh8f9vlTt6tjdD6G6Wc0,272
574
- meutils/llm/completions/rag/fire.py,sha256=iScBYodmhPMPhYW10LhNBi9KREEIM8jBQvX8nBCYzv0,4479
582
+ meutils/llm/completions/rag/fire.py,sha256=7JzDpSBSeW6RQxfExdNwePkyLCnPWoWwjr6lqTcLfqk,4525
575
583
  meutils/llm/completions/rag/qwen.py,sha256=1dBNLLbQDRsM-7EGaStcWFU8HRa-rp3RxJ9cpxu6TBg,265
576
584
  meutils/llm/completions/rag/rag.py,sha256=mnC4bZUMuNYuPFXMBqXMofj_ms8uP5MMw1leJ5jXA_k,1209
577
585
  meutils/llm/functions/__init__.py,sha256=It6pcNwRBSh3Em45ooi61lc5tFg8eOYv0BvEFuRjSGQ,271
@@ -597,7 +605,7 @@ meutils/notice/wecom.py,sha256=xtuEg_Mb7vBRFj5Lu1oCXSpgU5QxekNyEljpDu1GnmI,6983
597
605
  meutils/notice/weekmeet.py,sha256=phq0Pz4ZjngP9EBdrfJSUNLkg5_KkVQYekMzGj3qFd0,1102
598
606
  meutils/office_automation/__init__.py,sha256=JfNin9Qsov04Wu0NWAGVX_0B4IQP5e_RfKpaHXSSz6o,241
599
607
  meutils/office_automation/doc.py,sha256=cqQ6Ac4JkSB0Wpt8DVkhb3PM_BpiDCEo3K2AZd2XP1c,508
600
- meutils/office_automation/pdf.py,sha256=pRGz0qE9OfpKlh-sZnOGCU3sJMEUoA19oikq6Rpswc4,1651
608
+ meutils/office_automation/pdf.py,sha256=B8ScuLpqLwVOm4iIaUWGkyQDtJtwEXdmxZHJrbIj2Ow,1651
601
609
  meutils/office_automation/pdm.py,sha256=AFKdLd80v0XJThs6toigSdzaW1xT02VdqbDtUWBxdGo,11894
602
610
  meutils/office_automation/pdm_run.py,sha256=GF4VlAXDFQ6oGTrWsLqF4YvrbINhL9Ei8A59cYDeriE,13502
603
611
  meutils/office_automation/report/__init__.py,sha256=llPWtGZdUcsw__Eym2FLOVh4Bew5PgPUDfuKS2s1RMA,244
@@ -658,6 +666,7 @@ meutils/schemas/hailuo_types.py,sha256=hmkjFPID5HS26Ayk80xS2a38XcubokEHxzg86cC0K
658
666
  meutils/schemas/haimian_types.py,sha256=jGu484UviAeBgy5OIUyRY4uYCxXfv16zDPqiJQr9wNQ,1364
659
667
  meutils/schemas/idphoto_types.py,sha256=nuHbpppejRSkJCiQ7YKx0Gnke0ShKZhOvdg0e7tk9-0,1074
660
668
  meutils/schemas/image_types.py,sha256=kcYdL7f-UsixSltsnfytSHn6W4OtAmIMMGBdVmV20k8,11594
669
+ meutils/schemas/jimeng_types.py,sha256=qsjtyURGsGnAGAhfZ9k4k-mtbRgjbWId75UMV1d6AiE,851
661
670
  meutils/schemas/jina_types.py,sha256=SLRRBCap2B1uXnHF7Sgnlz1Work8HvdIltjj4oVlGTk,8826
662
671
  meutils/schemas/kimi_types.py,sha256=PjCgHwCDNzKasn4X6rUzvOENqKYT3xj07cgp71IdsDA,3607
663
672
  meutils/schemas/kling_types.py,sha256=brWaREBtQeZGUuwgOW2p-vIm2WWInYkq8UfrLInT-Ik,6959
@@ -690,7 +699,7 @@ meutils/schemas/db/__init__.py,sha256=m1maURVoM6dIW0yt6ELZrZTzULtkHybVOSXtHNJRVI
690
699
  meutils/schemas/db/oneapi_types.py,sha256=Jtt1hXRS5C3DHf_wrkjklVcdPllsAFrzvLq9JLuTdtc,2858
691
700
  meutils/schemas/oneapi/__init__.py,sha256=uevbi3QAvFzN9WPbx9bYKTDyKt7P2ueZO6W0nSiD0sk,289
692
701
  meutils/schemas/oneapi/_types.py,sha256=ClvAaNy3SahEN8lL8KEErHTD6HANelXUeKc_3iLfosQ,1488
693
- meutils/schemas/oneapi/common.py,sha256=Mqmqe9-YJ-n53DUQHPvdpdTL-_IymYmfp_Cc285_GOI,23011
702
+ meutils/schemas/oneapi/common.py,sha256=IIHhpelCpoHLyL4lGqBp8g-_G12h93drfc15EIoAv1k,23176
694
703
  meutils/schemas/oneapi/icons.py,sha256=T7W5gInBJoHe62wzMimbG_UI-wn3_-rmQ1O4O2z-CQY,1089
695
704
  meutils/schemas/oneapi/model_group_info.py,sha256=rGtflYJuFIjk5MsVEvK9JUR4IciX8jfErqeLqf8DIlQ,1586
696
705
  meutils/schemas/oneapi/model_info.py,sha256=_uwKEPIIqm7ZYfhmpxtXB2QNsS83SpJY-OaBzvogC9w,772
@@ -818,9 +827,9 @@ meutils/tools/seize.py,sha256=nOKAS63w-Lbi48I0m2MPhdsokUTwxco0laPxYVmW4Mw,1064
818
827
  meutils/tools/service_monitor.py,sha256=ibsLtBN2g2DL7ZnLJ8vhiZOiOcqTAyx711djDdBK-3M,1255
819
828
  meutils/tools/sys_monitor.py,sha256=6MoyzrItqDUOSjfHcMJmMofQkEPTW36CT_aKui0rg84,429
820
829
  meutils/tools/token_monitor.py,sha256=Np-YK-R4P4IPAXyZvMxwvXI4sFmNJQAQK1lSegNaYpA,997
821
- MeUtils-2024.12.13.15.39.7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
822
- MeUtils-2024.12.13.15.39.7.dist-info/METADATA,sha256=eKtp_MnZh9mzP1IOQ9MIWvx82vPdET2OPMhmcT0sKMw,6202
823
- MeUtils-2024.12.13.15.39.7.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
824
- MeUtils-2024.12.13.15.39.7.dist-info/entry_points.txt,sha256=lufZlBHRqqZKdY-ZQJ4CSZb0qhV5hQC37egZna9M7ug,357
825
- MeUtils-2024.12.13.15.39.7.dist-info/top_level.txt,sha256=cInfxMmkgNOskurdjwP5unau4rA7Uw48nu07tYhS7KY,22
826
- MeUtils-2024.12.13.15.39.7.dist-info/RECORD,,
830
+ MeUtils-2024.12.19.9.30.53.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
831
+ MeUtils-2024.12.19.9.30.53.dist-info/METADATA,sha256=fInOqzusrqHngt8lGDv1kHJkmaD279MwFmRKDYIFCI4,6202
832
+ MeUtils-2024.12.19.9.30.53.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
833
+ MeUtils-2024.12.19.9.30.53.dist-info/entry_points.txt,sha256=lufZlBHRqqZKdY-ZQJ4CSZb0qhV5hQC37egZna9M7ug,357
834
+ MeUtils-2024.12.19.9.30.53.dist-info/top_level.txt,sha256=cInfxMmkgNOskurdjwP5unau4rA7Uw48nu07tYhS7KY,22
835
+ MeUtils-2024.12.19.9.30.53.dist-info/RECORD,,
examples/_openaisdk/4v.py CHANGED
@@ -71,7 +71,8 @@ messages = [
71
71
  ]
72
72
  response = openai.chat.completions.create(
73
73
  # model='gpt-4-vision-preview',
74
- model='gpt-4o',
74
+ # model='gpt-4o',
75
+ model='gpt-4o-2024-08-06',
75
76
 
76
77
  # model="gemini-pro-vision",
77
78
  # model='gemini-1.5-flash-latest',
@@ -16,16 +16,12 @@ base_url = "http://0.0.0.0:8000/v1"
16
16
  # base_url="https://api.gptgod.online/v1"
17
17
  base_url = "https://api.chatllm.vip/v1"
18
18
 
19
-
20
-
21
19
  from openai import OpenAI
22
20
 
23
-
24
21
  client = OpenAI(
25
22
  base_url=base_url,
26
23
  )
27
24
 
28
-
29
25
  with timer('聊天模型'):
30
26
  data = {
31
27
  # 'model': 'gpt-3.5-turbo',
@@ -42,7 +38,6 @@ with timer('聊天模型'):
42
38
  # 'model': 'glm-4-all',
43
39
  'model': '65f41c8a9c0ebbcbe28bb9c1',
44
40
 
45
-
46
41
  'messages': [
47
42
  {'role': 'system', 'content': 'You are a helpful assistant.'},
48
43
  # {'role': 'user', 'content': '你是谁'},
@@ -15,7 +15,7 @@ from os import getenv
15
15
  # gets API Key from environment variable OPENAI_API_KEY
16
16
  client = OpenAI(
17
17
  base_url="https://openrouter.ai/api/v1",
18
- api_key=getenv("OPENROUTER_API_KEY"),
18
+ api_key=os.getenv("OPENROUTER_API_KEY"),
19
19
  )
20
20
 
21
21
  completion = client.chat.completions.create(
@@ -23,7 +23,10 @@ completion = client.chat.completions.create(
23
23
  # "HTTP-Referer": $YOUR_SITE_URL, # Optional, for including your app on openrouter.ai rankings.
24
24
  # "X-Title": $YOUR_APP_NAME, # Optional. Shows in rankings on openrouter.ai.
25
25
  # },
26
- model="meta-llama/llama-3.2-11b-vision-instruct:free",
26
+ # model="meta-llama/llama-3.2-11b-vision-instruct:free",
27
+ model="openai/o1",
28
+ max_tokens=1000,
29
+
27
30
  messages=[
28
31
  {
29
32
  "role": "user",
@@ -42,6 +42,7 @@ def check_models(models, api_key=os.getenv("OPENAI_API_KEY_GUOCHAN")):
42
42
  temperature=1,
43
43
  # top_p=0.9,
44
44
  top_p=1,
45
+ max_tokens=100,
45
46
 
46
47
  # **to_openai_completion_params(data)
47
48
 
@@ -57,6 +58,8 @@ def check_models(models, api_key=os.getenv("OPENAI_API_KEY_GUOCHAN")):
57
58
  stream=True,
58
59
  temperature=0,
59
60
  top_p=0,
61
+ max_tokens=100,
62
+
60
63
  )
61
64
  print(f"""\n\n{"-" * 32}流{"-" * 32}\n\n""")
62
65
 
@@ -189,10 +192,13 @@ if __name__ == '__main__':
189
192
 
190
193
  models = [
191
194
  # 'doubao-pro-128k',
192
- "ai-search-pro:scholar",
195
+ # "ai-search-pro:scholar",
196
+ "o1"
193
197
  ]
194
198
 
195
- check_models(models, api_key=os.getenv("OPENAI_API_KEY"))
199
+ # check_models(models, api_key=os.getenv("OPENAI_API_KEY"))
200
+ check_models(models, api_key=os.getenv("OPENAI_API_KEY_OPENAI"))
201
+
196
202
  #
197
203
  # for i in range(5):
198
204
  # check_models(models, api_key=os.getenv("OPENAI_API_KEY_GUOCHAN") + "-302")
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ # @Project : AI. @by PyCharm
4
+ # @File : llmcache
5
+ # @Time : 2024/12/16 11:06
6
+ # @Author : betterme
7
+ # @WeChat : meutils
8
+ # @Software : PyCharm
9
+ # @Description :
10
+
11
+ from meutils.pipe import *
12
+
13
+
14
+ from gptcache import cache
15
+ from gptcache.adapter import openai
16
+
17
+ cache.init()
18
+ cache.set_openai_key()
@@ -250,7 +250,7 @@ async def create_task(request: VideoRequest, token: Optional[str] = None, vip: O
250
250
  response.raise_for_status()
251
251
  data = response.json()
252
252
 
253
- task_id = data.get('data', {}).get('id', '')
253
+ task_id = (data.get('data') or {}).get('id', '')
254
254
  response = VideoResponse(
255
255
  task_id=f"hailuo-{task_id}" if not vip else f"hailuoai-{task_id}",
256
256
  base_resp=data.get('statusInfo', {}),
@@ -41,7 +41,10 @@ if __name__ == '__main__':
41
41
  #
42
42
  # print(fal_client.upload_file(p))
43
43
 
44
- # url = fal_client.upload_file(Path("/Users/betterme/PycharmProjects/AI/MeUtils/meutils/ai_video/douyin.mp4"))
44
+ # fal_client.upload()
45
+ import fal_client
46
+
47
+ url = fal_client.upload_file(Path("/Users/betterme/PycharmProjects/AI/MeUtils/meutils/ai_video/douyin.mp4"))
45
48
 
46
49
  # arun(to_url(Path("/Users/betterme/PycharmProjects/AI/MeUtils/meutils/ai_video/douyin.mp4").read_bytes(), content_type=None))
47
50
 
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ # @Project : AI. @by PyCharm
4
+ # @File : __init__.py
5
+ # @Time : 2024/12/16 17:46
6
+ # @Author : betterme
7
+ # @WeChat : meutils
8
+ # @Software : PyCharm
9
+ # @Description :
10
+
11
+ from meutils.pipe import *
@@ -0,0 +1,253 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ # @Project : AI. @by PyCharm
4
+ # @File : common
5
+ # @Time : 2024/12/16 18:19
6
+ # @Author : betterme
7
+ # @WeChat : meutils
8
+ # @Software : PyCharm
9
+ # @Description : https://github.com/LLM-Red-Team/jimeng-free-api/commit/acd362a4cecd115938bf4bc9bbb0067738aa0d5b#diff-e6a7354ac1431dc3751e91efaf1799200c1ce2fa8abe975a49c32644290988baR121
10
+ from openai import AsyncClient
11
+
12
+ from meutils.pipe import *
13
+ from meutils.hash_utils import md5
14
+ from meutils.schemas.image_types import ImageRequest
15
+ from meutils.schemas.jimeng_types import BASE_URL, MODELS_MAP
16
+ from meutils.str_utils.regular_expression import parse_url
17
+ from meutils.apis.jimeng.files import upload
18
+ from meutils.io.files_utils import to_bytes
19
+ from meutils.caches.redis_cache import cache
20
+
21
+ from fake_useragent import UserAgent
22
+
23
+ ua = UserAgent()
24
+
25
+
26
+ def get_headers(url, token="693701c43e477b7c405cc7e2fef0ddbd"):
27
+ device_time = f"{int(time.time())}"
28
+ sign = md5(
29
+ # f"9e2c|receive|7|5.8.0|{device_time}||11ac"
30
+ f"9e2c|{url[-7:]}|7|5.8.0|{device_time}||11ac"
31
+ )
32
+
33
+ headers = {
34
+ 'appid': '513695',
35
+ 'appvr': '5.8.0',
36
+ 'device-time': device_time,
37
+ 'pf': '7',
38
+ 'sign': sign,
39
+ 'sign-ver': '1',
40
+ 'Cookie': f'sid_guard={token}|{device_time}|5184000|Fri,+14-Feb-2025+00:51:51+GMT',
41
+ 'User-Agent': ua.random,
42
+
43
+ 'content-type': 'application/json',
44
+ # "Referer": "https://jimeng.jianying.com/ai-tool/image/generate",
45
+ }
46
+ return headers
47
+
48
+
49
+ @cache(ttl=3600 // 2)
50
+ async def get_upload_token(token): # 3600 跨账号?
51
+ url = "/artist/v2/tools/get_upload_token"
52
+ headers = get_headers(url, token)
53
+
54
+ payload = {"scene": 2}
55
+ client = AsyncClient(base_url=BASE_URL, default_headers=headers)
56
+ response = await client.post(url, body=payload, cast_to=object)
57
+ return response
58
+
59
+
60
+ @alru_cache(12 * 3600)
61
+ async def receive_credit(token):
62
+ # token = "eb4d120829cfd3ee957943f63d6152ed" # y
63
+ # token = "9ba826acc1a4bf0e10912eb01beccfe0" # w
64
+ url = "/commerce/v1/benefits/credit_receive"
65
+ headers = get_headers(url, token)
66
+ payload = {"time_zone": "Asia/Shanghai"}
67
+ client = AsyncClient(base_url=BASE_URL, default_headers=headers)
68
+ response = await client.post(url, body=payload, cast_to=object)
69
+ logger.debug(bjson(response))
70
+
71
+
72
+ async def get_credit(token):
73
+ # token = "eb4d120829cfd3ee957943f63d6152ed" # y
74
+ # token = "9ba826acc1a4bf0e10912eb01beccfe0" # w
75
+
76
+ url = "/commerce/v1/benefits/user_credit"
77
+ headers = get_headers(url, token)
78
+
79
+ payload = {}
80
+ client = AsyncClient(base_url=BASE_URL, default_headers=headers)
81
+ response = await client.post(url, body=payload, cast_to=object)
82
+ if response['data']['credit']['gift_credit'] == 0: # 签到
83
+ await receive_credit(token)
84
+
85
+ logger.debug(bjson(response))
86
+ return response
87
+
88
+
89
+ async def check_token(token, threshold: int = 1):
90
+ try:
91
+ response = await get_credit(token)
92
+ credits = sum(response['data']['credit'].values())
93
+ # logger.debug(credits)
94
+ return credits >= threshold
95
+ except Exception as e:
96
+ return False
97
+
98
+
99
+ async def create_draft_content(request: ImageRequest, token: str):
100
+ """
101
+ 创建草稿内容
102
+ """
103
+ request.model = MODELS_MAP.get(request.model, MODELS_MAP["default"])
104
+
105
+ height = width = 1360
106
+ if 'x' in request.size:
107
+ height, width = map(int, request.size.split('x'))
108
+
109
+ main_component_id = str(uuid.uuid4())
110
+
111
+ if urls := parse_url(request.prompt):
112
+ url = urls[-1]
113
+ upload_token = await get_upload_token(token)
114
+ image_uri = upload(await to_bytes(url), upload_token)
115
+
116
+ request.prompt = request.prompt.replace(url, '')
117
+ request.model = "high_aes_general_v20_L:general_v2.0_L" # 2.1不支持图片编辑
118
+
119
+ component = {
120
+ "type": "image_base_component",
121
+ "id": main_component_id,
122
+ "min_version": "3.0.2",
123
+ "generate_type": "blend",
124
+ "aigc_mode": "workbench",
125
+ "abilities": {
126
+ "type": "",
127
+ "id": str(uuid.uuid4()),
128
+ "blend": {
129
+ "type": "",
130
+ "id": str(uuid.uuid4()),
131
+ "core_param": {
132
+ "type": "",
133
+ "id": str(uuid.uuid4()),
134
+ "model": request.model,
135
+ "prompt": f"##{request.prompt}",
136
+ "sample_strength": 0.5,
137
+ "image_ratio": 1,
138
+ "large_image_info": {
139
+ "type": "",
140
+ "id": str(uuid.uuid4()),
141
+ "height": height,
142
+ "width": width
143
+ },
144
+ },
145
+ "ability_list": [
146
+ {
147
+ "type": "",
148
+ "id": str(uuid.uuid4()),
149
+ "name": "byte_edit",
150
+ "image_uri_list": [
151
+ image_uri
152
+ ],
153
+ "image_list": [
154
+ {
155
+ "type": "image",
156
+ "id": str(uuid.uuid4()),
157
+ "source_from": "upload",
158
+ "platform_type": 1,
159
+ "name": "",
160
+ "image_uri": image_uri,
161
+ "width": 0,
162
+ "height": 0,
163
+ "format": "",
164
+ "uri": image_uri
165
+ }
166
+ ],
167
+ "strength": 0.5
168
+ }
169
+ ],
170
+ "history_option": {
171
+ "type": "",
172
+ "id": str(uuid.uuid4()),
173
+ },
174
+ "prompt_placeholder_info_list": [
175
+ {
176
+ "type": "",
177
+ "id": str(uuid.uuid4()),
178
+ "ability_index": 0
179
+ }
180
+ ],
181
+ "postedit_param": {
182
+ "type": "",
183
+ "id": str(uuid.uuid4()),
184
+ "generate_type": 0
185
+ }
186
+ }
187
+ }
188
+ }
189
+
190
+ else:
191
+
192
+ component = {
193
+ "type": "image_base_component",
194
+ "id": main_component_id,
195
+ "min_version": "3.0.2",
196
+ "generate_type": "generate",
197
+ "aigc_mode": "workbench",
198
+ "abilities": {
199
+ "type": "",
200
+ "id": str(uuid.uuid4()),
201
+ "generate": {
202
+ "type": "",
203
+ "id": str(uuid.uuid4()),
204
+ "core_param": {
205
+ "type": "",
206
+ "id": str(uuid.uuid4()),
207
+ "model": request.model,
208
+ "prompt": request.prompt,
209
+ "negative_prompt": request.negative_prompt or "",
210
+ "seed": request.seed or 426999300,
211
+ "sample_strength": 0.5,
212
+ "image_ratio": 1,
213
+ "large_image_info": {
214
+ "type": "",
215
+ "id": str(uuid.uuid4()),
216
+ "height": height,
217
+ "width": width
218
+ }
219
+ },
220
+ "history_option": {
221
+ "type": "",
222
+ "id": str(uuid.uuid4()),
223
+ }
224
+ }
225
+ }
226
+ }
227
+
228
+ draft_content = {
229
+ "type": "draft",
230
+ "id": str(uuid.uuid4()),
231
+ "min_version": "3.0.2",
232
+ "min_features": [],
233
+ "is_from_tsn": True,
234
+ "version": "3.0.8",
235
+ "main_component_id": main_component_id,
236
+ "component_list": [component]
237
+ }
238
+
239
+ logger.debug(bjson(draft_content))
240
+
241
+ return draft_content
242
+
243
+
244
+ if __name__ == '__main__':
245
+ token = "693701c43e477b7c405cc7e2fef0ddbd"
246
+ token = "eb4d120829cfd3ee957943f63d6152ed"
247
+ # arun(get_credit(token))
248
+ arun(check_token(token))
249
+
250
+ # arun(get_upload_token(token))
251
+ #
252
+ # request = ImageRequest(prompt='https://oss.ffire.cc/files/kling_watermark.png笑起来')
253
+ # arun(create_draft_content(request, token))