MeUtils 2025.4.23.16.8.28__py3-none-any.whl → 2025.4.25.20.47.56__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.4.23.16.8.28.dist-info → MeUtils-2025.4.25.20.47.56.dist-info}/METADATA +262 -262
- {MeUtils-2025.4.23.16.8.28.dist-info → MeUtils-2025.4.25.20.47.56.dist-info}/RECORD +22 -21
- examples/_openaisdk/openai_google.py +17 -4
- examples/_openaisdk/openai_images.py +3 -1
- meutils/apis/google/chat.py +24 -13
- meutils/apis/images/recraft.py +21 -10
- meutils/apis/jimeng/__init__.py +0 -1
- meutils/apis/oneapi/channel.py +79 -1
- meutils/apis/oneapi/demo.py +75 -0
- meutils/apis/oneapi/log.py +3 -1
- meutils/apis/oneapi/user.py +1 -1
- meutils/apis/search/metaso.py +3 -1
- meutils/apis/siliconflow/images.py +3 -0
- meutils/config_utils/lark_utils/common.py +3 -0
- meutils/data/VERSION +1 -1
- meutils/io/files_utils.py +3 -0
- meutils/llm/completions/qwenllm.py +2 -2
- meutils/schemas/oneapi/common.py +50 -18
- {MeUtils-2025.4.23.16.8.28.dist-info → MeUtils-2025.4.25.20.47.56.dist-info}/LICENSE +0 -0
- {MeUtils-2025.4.23.16.8.28.dist-info → MeUtils-2025.4.25.20.47.56.dist-info}/WHEEL +0 -0
- {MeUtils-2025.4.23.16.8.28.dist-info → MeUtils-2025.4.25.20.47.56.dist-info}/entry_points.txt +0 -0
- {MeUtils-2025.4.23.16.8.28.dist-info → MeUtils-2025.4.25.20.47.56.dist-info}/top_level.txt +0 -0
@@ -109,9 +109,9 @@ examples/_openaisdk/openai_ep.py,sha256=cAaeyC8Lstk1MB36c4h7X9n7EnEnY7rr2Tugo_di
|
|
109
109
|
examples/_openaisdk/openai_files.py,sha256=zcF4k4sQ2FnINhq6x1wCKw1WCu93g1h69Yul_rLdakE,2058
|
110
110
|
examples/_openaisdk/openai_gitee.py,sha256=UQEJMQMQDhgqYzo_aYetYXnBmVtqRwIweJDDK3NlSMw,1205
|
111
111
|
examples/_openaisdk/openai_god.py,sha256=O8fbhyxiIlVR7pTvBTXgQ2QTwfcZ2MkEIyDe_jp797A,1056
|
112
|
-
examples/_openaisdk/openai_google.py,sha256=
|
112
|
+
examples/_openaisdk/openai_google.py,sha256=jcHgpia-zhhS8jeAuccqkRVb9IjQLb6dR3DOwpj3GSc,6318
|
113
113
|
examples/_openaisdk/openai_groq.py,sha256=_5Ue1yEx0Gp6theFioB_D8kepR0UlqMU96PVGH-LkVY,7363
|
114
|
-
examples/_openaisdk/openai_images.py,sha256
|
114
|
+
examples/_openaisdk/openai_images.py,sha256=-Dp0K54jTMmRE1BsYrfRn8XkOLKBdpZIk55KCDpBqxo,6077
|
115
115
|
examples/_openaisdk/openai_jina.py,sha256=QeGRXMQmkJyg8Cz4Vfx4pP39a5TcO7pQQfPAPbBA8bs,1628
|
116
116
|
examples/_openaisdk/openai_json.py,sha256=M4tq_IkzYbmtgbFilGQHmRdJhH0OltiwGk7cK7uc-sQ,1850
|
117
117
|
examples/_openaisdk/openai_kindo.py,sha256=8dsetXZexJCLboDp3uyxK7z50iDEiQFkA5-hkJTLO4E,741
|
@@ -367,7 +367,7 @@ meutils/apis/gitee/images/__init__.py,sha256=zvS8e0ogQLqajZTAype1e0TDLJenlfbRQ16
|
|
367
367
|
meutils/apis/gitee/images/kolors.py,sha256=IGpDtMiOOPgbE8ZOXFP9-Hh_XNCDkuvNYjKQbXq8Nik,3338
|
368
368
|
meutils/apis/google/__init__.py,sha256=3pcpV81045y42FCTSdN99YGLCabwocR-f1_gjTSeFhE,243
|
369
369
|
meutils/apis/google/audios.py,sha256=Su1V3TAOn8X94KgOrmpLRPnYETgTyDXqjDf4qQMkzAo,3289
|
370
|
-
meutils/apis/google/chat.py,sha256=
|
370
|
+
meutils/apis/google/chat.py,sha256=cetRTmYIivhYpHkRqbg_oGMAKA6L_EseDZBSvBnqEPw,16177
|
371
371
|
meutils/apis/google/files.py,sha256=0J1sJT1HFmh-V77_eiSzSBcqcF-i7w08M0rzjSyIXO0,1015
|
372
372
|
meutils/apis/google/gemini_sdk.py,sha256=2cBRrNxrqls0qYPXl-ZXovZlinTcIyrXoRPmcQlVL8Q,5619
|
373
373
|
meutils/apis/google/google2openai.py,sha256=JaRw4XfGjy1XAbM4UwLqwLHmldOvM1J1tbMTagi10os,3075
|
@@ -397,7 +397,7 @@ meutils/apis/images/deepinfra.py,sha256=lMqfU0LIXEzHiAS31dCcoTnPIE6tpoDJhq61H0TV
|
|
397
397
|
meutils/apis/images/demo.py,sha256=Cjk-EKMKbp44czykW_44qR0TzElX8nNCALqXBBw5sJA,4405
|
398
398
|
meutils/apis/images/edits.py,sha256=4DDBkr-n_5F6N1bLkSS2puznyPv1cROFhohZc7wVSpY,10155
|
399
399
|
meutils/apis/images/eidt.py,sha256=s8IBbCjwwoogIUf-d2O7nkawUmly9n19nvLYPaLEeg4,1217
|
400
|
-
meutils/apis/images/recraft.py,sha256=
|
400
|
+
meutils/apis/images/recraft.py,sha256=t6BQJEL5WQgD5tMclHu8rgKjgaj_R6iYfpDn6eJl0VM,72410
|
401
401
|
meutils/apis/images/flux/__init__.py,sha256=W_PZabQm6EmtJYmzEiEpL_WCXTAW0AiJ-t_n5UTrE8c,271
|
402
402
|
meutils/apis/images/flux/fluxpro.py,sha256=NFl9t9C3R3jsNJpez4o9tOz3r-fjRXj-vKMxCSTRDTU,4022
|
403
403
|
meutils/apis/images/flux/mystic.py,sha256=cUkqaMAbd3dSBCvFEoNBBoEoWCGzvBJWPEkEq1Q8xzw,3616
|
@@ -412,7 +412,7 @@ meutils/apis/images/virtual_try_on/images.py,sha256=plELzbJ5yf3zth0XCh8b_dgeRQai
|
|
412
412
|
meutils/apis/jiema/24mail.py,sha256=GUszRtoDe3T9q-X4embwT5YhcjgQ3XnkTJMKX93sCF4,2595
|
413
413
|
meutils/apis/jiema/__init__.py,sha256=YBybggoDRYCNYcwJOypxR7MzfTjIhqO7BkGlTt7NDo4,271
|
414
414
|
meutils/apis/jiema/yezi.py,sha256=26vhnA3lC5049Rqx-CHO-wyGKbdZAfvjEOG90W38cr0,3675
|
415
|
-
meutils/apis/jimeng/__init__.py,sha256=
|
415
|
+
meutils/apis/jimeng/__init__.py,sha256=ENdwkppOOekt9Qzy_50TyA7lzNEqo0TpZcF7d2rYBhc,245
|
416
416
|
meutils/apis/jimeng/common.py,sha256=Dr6BmCT9uRw89jgIwECe7dKNZpJIGUBJXzRzK-1b-hw,6904
|
417
417
|
meutils/apis/jimeng/doubao.py,sha256=5OdnBpmZQOCLIb6lnN8YrL7J7E0XF47q0UF-z6asSuI,4295
|
418
418
|
meutils/apis/jimeng/doubao_utils.py,sha256=XCHnvwfCOtJmPQuzDOCfKDMP_Pcqh-Y4w2h5f7Y2gzM,5999
|
@@ -440,12 +440,13 @@ meutils/apis/monica/llm.py,sha256=gYyBPOTvmoNFaa1KmW3OlSsRKeN7C97EyPUa264nJ08,26
|
|
440
440
|
meutils/apis/napkin/__init__.py,sha256=EWwpRJEbN46d6Dk9PHAZvsYmqD_EOK0jjKQL1kYtcKs,271
|
441
441
|
meutils/apis/napkin/icons.py,sha256=_L8EaSeQ6ChT5w7q3jnj_AcRhKvNiBg3-qUKo9JQ12o,2217
|
442
442
|
meutils/apis/oneapi/__init__.py,sha256=wg_kqNkFqOkP70vnOHvAeKREps57Rqliu5yKC0gsgLk,284
|
443
|
-
meutils/apis/oneapi/channel.py,sha256=
|
443
|
+
meutils/apis/oneapi/channel.py,sha256=Dooykf34bFXx-NPgODiWHIb52HzJG2r05m06VaQi3pc,4649
|
444
444
|
meutils/apis/oneapi/common.py,sha256=AIs8ro-1qui3FG42msBY6dL_zt9QJ0jS63qtp-XTlY4,3617
|
445
|
-
meutils/apis/oneapi/
|
445
|
+
meutils/apis/oneapi/demo.py,sha256=i9iBK2OftTvOZdPcCo2nxu8zs0fSKIZbzD8DRKQNla8,1851
|
446
|
+
meutils/apis/oneapi/log.py,sha256=gNFFXXcG2Xp5ttO7Q7qR6n6GQUheuU8SOCjJPXZudLY,1447
|
446
447
|
meutils/apis/oneapi/token.py,sha256=LaKwkHXNvF46wXEVtbSNwfi0ujuQo7oRyln39MOPKX0,1638
|
447
448
|
meutils/apis/oneapi/token_.py,sha256=3NPU1jbjiRbcXIkw8bANcnby3rXq4U2LjU_8W3PaE_4,2560
|
448
|
-
meutils/apis/oneapi/user.py,sha256=
|
449
|
+
meutils/apis/oneapi/user.py,sha256=DTK9NZ9xXCH-8AR6lpX-iaMSA08JSs2KpPoi3atHf7k,4030
|
449
450
|
meutils/apis/oneapi/utils.py,sha256=kuXwRQee3lSgJH7ffGP3Is4BhaUVylKJviG8FVN0F-I,1660
|
450
451
|
meutils/apis/pixverse/__init__.py,sha256=WiboEUfJ_3Hs2WI3OymEspx8_ZSTgMglxTJd97Qk7qo,271
|
451
452
|
meutils/apis/pixverse/pixverse.py,sha256=dvnyYVUXCEY_cLnmX9lvq9TesvplCMCuJmmP7ShchQk,5534
|
@@ -464,7 +465,7 @@ meutils/apis/search/__init__.py,sha256=1lg0ogEBgtwTi3XvkL5hMfSd14A6YNLO7M9itEJma
|
|
464
465
|
meutils/apis/search/_web_search.py,sha256=h_rj0jKDbP1ZPvMPPHMhAnfVnjmW6I4XqEddrjYeq5U,2842
|
465
466
|
meutils/apis/search/ark_web_search.py,sha256=i6lrw-AinuH22Gds89TTmrvfJKYMFzBAOc-_1uEAPZI,2013
|
466
467
|
meutils/apis/search/baichuan.py,sha256=OUD0TH7KzqSxtuRJgjJPWO8XRQIoUwW5RX7lWMo7BXw,268
|
467
|
-
meutils/apis/search/metaso.py,sha256=
|
468
|
+
meutils/apis/search/metaso.py,sha256=2DKWwJsVEfsovi_hSUomoi0muUbAkPW7tVCjBHwrVSg,8261
|
468
469
|
meutils/apis/search/metaso_.py,sha256=PqMX3FLYbbAcc9qpqrPZ58LuSF29h0asZO1XMYmXbes,3144
|
469
470
|
meutils/apis/search/n.py,sha256=o7jzNoR5v_nAjgdUvWgebL3nvvo3ECpq2KCj9YhUNr4,4337
|
470
471
|
meutils/apis/search/searxng.py,sha256=RBPeq-AYj5D42gROrZNg0SxIWwWEW0oqrbQ3wEDH9k8,951
|
@@ -472,7 +473,7 @@ meutils/apis/search/zhipu_web_search.py,sha256=cHt83mzk5Qx_DyoHpHaAHGtyi_saW6hCF
|
|
472
473
|
meutils/apis/siliconflow/__init__.py,sha256=DQ-A6wAWGna49pmyGhcIWgc2zx6TN9DfQmSUdAW7qjk,241
|
473
474
|
meutils/apis/siliconflow/audio.py,sha256=pk1OROATtAURPQ6VkswmR5gJFOFYJJPnjp-boDAf8X0,2017
|
474
475
|
meutils/apis/siliconflow/image_to_image.py,sha256=Clk-2hACzoUP0yTHnxhlV5MA_HsVdcPuhrX41YARWPM,89439
|
475
|
-
meutils/apis/siliconflow/images.py,sha256=
|
476
|
+
meutils/apis/siliconflow/images.py,sha256=5frwCWqRGto-7ai2_b_BO4tgdMaW8p3Y-tXTMHk5GDU,7601
|
476
477
|
meutils/apis/siliconflow/rerankers.py,sha256=GuKT33MmAiVULqNaAO9IIy1Zp570-kYJ6xP03eLCp5Y,1259
|
477
478
|
meutils/apis/siliconflow/text_to_image.py,sha256=rDxk6NIj4TjigcSPVDZknQR9nUpK5CTJBXc3KjI1Z8Y,4457
|
478
479
|
meutils/apis/siliconflow/utils.py,sha256=Awe0V7Mkceop1vWWrw9901cKQ6HHntIn8HbIG0fEo40,2091
|
@@ -553,12 +554,12 @@ meutils/cmds/subprocess_demo.py,sha256=oTeTIx8k6XwtOT6hZpmy9XNcRErzilqWcdoxcrVcH
|
|
553
554
|
meutils/config_utils/__init__.py,sha256=GhgsStfGJDC8F_YgC6X5Jnj9HkgXJXxeYiJWTAkWKTo,271
|
554
555
|
meutils/config_utils/manager.py,sha256=du-8e9Zdgnrn9e0b4GPR6FGtuQY7DLWNJqgkoU0TZ48,3147
|
555
556
|
meutils/config_utils/lark_utils/__init__.py,sha256=Gf-5Y8uZiqY9jdbfiIboL92MQjOTOo0ZZ245PGxCbaY,297
|
556
|
-
meutils/config_utils/lark_utils/common.py,sha256=
|
557
|
+
meutils/config_utils/lark_utils/common.py,sha256=KI3Kd1q5ItqOFgnlBCEsmlkdXUOaJLlfjs-Tw-XxIGs,14514
|
557
558
|
meutils/config_utils/lark_utils/demo.py,sha256=3g0Fs7oLaeW75T60gYWMLgyNg1OnfOjfHOno5NxNAio,293
|
558
559
|
meutils/config_utils/lark_utils/x.py,sha256=MlMQGhehP9xMEgetxVCX68XFaosfKoW1JA5cZ3JqN2w,1857
|
559
560
|
meutils/crawlers/__init__.py,sha256=TBU4xA-IOsHV-0yIkW7YXxn_QT7TT8NncqxO7IykEfs,271
|
560
561
|
meutils/data/SimHei.ttf,sha256=-XEnekS5yHP_URkT4XBI2w22ylV-KxudhkeIYFbrILA,10062565
|
561
|
-
meutils/data/VERSION,sha256=
|
562
|
+
meutils/data/VERSION,sha256=AqDp6bUKpzh23K86zmAxsaaJUCG__5FFFSFXHLE8HJw,19
|
562
563
|
meutils/data/_FLAG,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
563
564
|
meutils/data/_SUCCESS,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
564
565
|
meutils/data/__init__.py,sha256=Hfwkkxs4zHqKhxht0YrhS566a9P5axtmgNvM5wF8ceQ,243
|
@@ -605,7 +606,7 @@ meutils/init/evn.py,sha256=GPw9Un8YbgYJmjwd-uYWQ8JeVr6pRxwyYbDv3W8fb1s,1588
|
|
605
606
|
meutils/init/oo.py,sha256=jXWaCWWFYVPGgTIas47Z3J7sIq-CD7DyK6fKDBsq8GA,12884
|
606
607
|
meutils/io/__init__.py,sha256=uW43ZfdWu7adRvwvcTzUGtn4CseRmbzEJdlZV-oqHEA,2107
|
607
608
|
meutils/io/_openai_files.py,sha256=UIiu6Zg7iSFIn1xIcpLznFlnfCxAJFGuvuPtxvTNHfI,1005
|
608
|
-
meutils/io/files_utils.py,sha256=
|
609
|
+
meutils/io/files_utils.py,sha256=_obCTc0ztv_e7Q9w0wPKuSPETH0xgjHaEvmVanlqM7I,8683
|
609
610
|
meutils/io/image.py,sha256=BJmYzx7o66X7C32gOfVmfr5tBRXOi0IYQY7BpGLsGrg,6926
|
610
611
|
meutils/io/minio_utils.py,sha256=i1YuxwDJzLse0smMXuPqnD1wirBBb8psmB_kd1oPoVU,1274
|
611
612
|
meutils/io/openai_files.py,sha256=wi4qp-olva8aF6AfBiUBfb_QlHzHolJJbH4UbHpRrB0,6032
|
@@ -658,7 +659,7 @@ meutils/llm/completions/delilegal.py,sha256=mr53ps7I33SC8Fjy4rma-xoNF-mLgwdZfHgd
|
|
658
659
|
meutils/llm/completions/dify.py,sha256=dqL_8uxAp2d8M00pkyh2I30tflwi4pUyX-V6pwe3_BA,3048
|
659
660
|
meutils/llm/completions/kimi.py,sha256=TSkLObebIAb_oivOMq3aKx9qoXcMy611_g2yIKex9eo,1541
|
660
661
|
meutils/llm/completions/modelscope.py,sha256=umPlJuHSL2RR0oNdTIAqts8iqEmGp_MR6Vh49g-UZuc,271
|
661
|
-
meutils/llm/completions/qwenllm.py,sha256=
|
662
|
+
meutils/llm/completions/qwenllm.py,sha256=_yt5k7qRmUbHgT9dfG1GVjdbmHc82dMiKIhQXQlV8gA,10757
|
662
663
|
meutils/llm/completions/rag.py,sha256=cpQ1aZX2QI1QDfFpODTxWHPYglK6_3qrlUM_KHLBNhc,1112
|
663
664
|
meutils/llm/completions/reasoner.py,sha256=rPIxW1iuvLuGhcOa6PkfcJmrTKtJV-8wRKfA09X09tg,6169
|
664
665
|
meutils/llm/completions/tryblend.py,sha256=NfVRktn1QiE2k60PzEI-LmKuxZCc7mtL_KlsrVcZg4k,8957
|
@@ -821,7 +822,7 @@ meutils/schemas/db/__init__.py,sha256=m1maURVoM6dIW0yt6ELZrZTzULtkHybVOSXtHNJRVI
|
|
821
822
|
meutils/schemas/db/oneapi_types.py,sha256=3t2m0H80saEXmYUZfVFrtEaY117GjZTsSa1GKgkJzqQ,3896
|
822
823
|
meutils/schemas/oneapi/__init__.py,sha256=uevbi3QAvFzN9WPbx9bYKTDyKt7P2ueZO6W0nSiD0sk,289
|
823
824
|
meutils/schemas/oneapi/_types.py,sha256=ClvAaNy3SahEN8lL8KEErHTD6HANelXUeKc_3iLfosQ,1488
|
824
|
-
meutils/schemas/oneapi/common.py,sha256=
|
825
|
+
meutils/schemas/oneapi/common.py,sha256=twbpq7MdAzZRrfaJpLRkOXQ-queCXqcLnB3uR92HfIk,36822
|
825
826
|
meutils/schemas/oneapi/icons.py,sha256=T7W5gInBJoHe62wzMimbG_UI-wn3_-rmQ1O4O2z-CQY,1089
|
826
827
|
meutils/schemas/oneapi/model_group_info.py,sha256=rGtflYJuFIjk5MsVEvK9JUR4IciX8jfErqeLqf8DIlQ,1586
|
827
828
|
meutils/schemas/oneapi/model_info.py,sha256=_uwKEPIIqm7ZYfhmpxtXB2QNsS83SpJY-OaBzvogC9w,772
|
@@ -950,9 +951,9 @@ meutils/tools/seize.py,sha256=nOKAS63w-Lbi48I0m2MPhdsokUTwxco0laPxYVmW4Mw,1064
|
|
950
951
|
meutils/tools/service_monitor.py,sha256=ibsLtBN2g2DL7ZnLJ8vhiZOiOcqTAyx711djDdBK-3M,1255
|
951
952
|
meutils/tools/sys_monitor.py,sha256=6MoyzrItqDUOSjfHcMJmMofQkEPTW36CT_aKui0rg84,429
|
952
953
|
meutils/tools/token_monitor.py,sha256=Np-YK-R4P4IPAXyZvMxwvXI4sFmNJQAQK1lSegNaYpA,997
|
953
|
-
MeUtils-2025.4.
|
954
|
-
MeUtils-2025.4.
|
955
|
-
MeUtils-2025.4.
|
956
|
-
MeUtils-2025.4.
|
957
|
-
MeUtils-2025.4.
|
958
|
-
MeUtils-2025.4.
|
954
|
+
MeUtils-2025.4.25.20.47.56.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
955
|
+
MeUtils-2025.4.25.20.47.56.dist-info/METADATA,sha256=6bVf8V0DbdANWAdnsuy99AMdIoYytK-ws9QH3tPAkZg,32834
|
956
|
+
MeUtils-2025.4.25.20.47.56.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
957
|
+
MeUtils-2025.4.25.20.47.56.dist-info/entry_points.txt,sha256=lufZlBHRqqZKdY-ZQJ4CSZb0qhV5hQC37egZna9M7ug,357
|
958
|
+
MeUtils-2025.4.25.20.47.56.dist-info/top_level.txt,sha256=cInfxMmkgNOskurdjwP5unau4rA7Uw48nu07tYhS7KY,22
|
959
|
+
MeUtils-2025.4.25.20.47.56.dist-info/RECORD,,
|
@@ -25,7 +25,8 @@ from meutils.io.files_utils import to_base64
|
|
25
25
|
# base64_image = arun(to_base64("https://oss.ffire.cc/cdn/2025-04-01/duTeRmdE4G4TSdLizkLx2B", content_type="image/jpg"))
|
26
26
|
|
27
27
|
client = OpenAI(
|
28
|
-
api_key=os.getenv("GOOGLE_API_KEY"),
|
28
|
+
# api_key=os.getenv("GOOGLE_API_KEY"),
|
29
|
+
api_key="AIzaSyCPiAASL_mYfJjy7LbLqwyeeRqZpNkXjDk",
|
29
30
|
base_url=os.getenv("GOOGLE_BASE_URL"),
|
30
31
|
)
|
31
32
|
|
@@ -52,6 +53,16 @@ import base64
|
|
52
53
|
import requests
|
53
54
|
from openai import OpenAI
|
54
55
|
|
56
|
+
prompt = query = """给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。
|
57
|
+
'.' 匹配任意单个字符
|
58
|
+
'*' 匹配零个或多个前面的那一个元素
|
59
|
+
所谓匹配,是要涵盖 整个 字符串 s 的,而不是部分字符串。
|
60
|
+
请补充下面代码:
|
61
|
+
class Solution:
|
62
|
+
def isMatch(self, s: str, p: str) -> bool:
|
63
|
+
"""
|
64
|
+
|
65
|
+
|
55
66
|
uri = 'https://generativelanguage.googleapis.com/v1beta/files/88n7hk8tau7g'
|
56
67
|
|
57
68
|
completion = client.chat.completions.create(
|
@@ -62,8 +73,9 @@ completion = client.chat.completions.create(
|
|
62
73
|
"content": [
|
63
74
|
{
|
64
75
|
"type": "text",
|
65
|
-
"text": "9个8如何加减乘除运直得到1000",
|
76
|
+
# "text": "9个8如何加减乘除运直得到1000",
|
66
77
|
# "text": "如何比较9.8 9.11哪个大"
|
78
|
+
"text": prompt,
|
67
79
|
},
|
68
80
|
# {
|
69
81
|
# "type": "image_url",
|
@@ -74,9 +86,10 @@ completion = client.chat.completions.create(
|
|
74
86
|
]
|
75
87
|
},
|
76
88
|
],
|
77
|
-
reasoning_effort="high",
|
78
|
-
|
89
|
+
# reasoning_effort="high",
|
90
|
+
reasoning_effort="low",
|
79
91
|
# reasoning_effort=None,
|
92
|
+
temperature=0.6
|
80
93
|
|
81
94
|
)
|
82
95
|
print(completion)
|
@@ -131,7 +131,8 @@ with timer('image'):
|
|
131
131
|
|
132
132
|
client = OpenAI(
|
133
133
|
# api_key=os.getenv("OPENAI_API_KEY") +,
|
134
|
-
api_key=os.getenv("OPENAI_API_KEY") + "-359",
|
134
|
+
# api_key=os.getenv("OPENAI_API_KEY") + "-359", # 3083
|
135
|
+
api_key=os.getenv("OPENAI_API_KEY_OPENAI") + "-3083",
|
135
136
|
|
136
137
|
# api_key=os.getenv("SILICONFLOW_API_KEY"),
|
137
138
|
# base_url=os.getenv("SILICONFLOW_BASE_URL"),
|
@@ -154,6 +155,7 @@ with timer('image'):
|
|
154
155
|
# model = 'flux1.0-schnell'
|
155
156
|
model = 'flux-dev'
|
156
157
|
model = "flux-schnell"
|
158
|
+
model = "gpt-image-1"
|
157
159
|
|
158
160
|
# model = 'flux1.0-dev'
|
159
161
|
# model = 'flux1.0-pro'
|
meutils/apis/google/chat.py
CHANGED
@@ -64,7 +64,7 @@ tools = [
|
|
64
64
|
class Completions(object):
|
65
65
|
def __init__(self, api_key: Optional[str] = None):
|
66
66
|
self.api_key = api_key
|
67
|
-
self.base_url = "https://
|
67
|
+
self.base_url = "https://g.chatfire.cn"
|
68
68
|
self.client = None ####
|
69
69
|
|
70
70
|
async def create_for_search(self, request: CompletionRequest):
|
@@ -112,14 +112,14 @@ class Completions(object):
|
|
112
112
|
|
113
113
|
elif request.last_user_content.startswith("http"):
|
114
114
|
url, user_content = request.last_user_content.split(maxsplit=1)
|
115
|
-
file_object = await self.upload(url)
|
116
115
|
|
117
|
-
yield
|
118
|
-
|
116
|
+
yield "> `⏳️Uploading`\n"
|
117
|
+
file_object = await self.upload(url)
|
118
|
+
yield f"```json\n{file_object.model_dump_json(indent=4)}\n```\n\n"
|
119
|
+
yield f"> [🤔Thinking]("
|
119
120
|
|
120
121
|
s = time.time()
|
121
122
|
for i in range(100):
|
122
|
-
await asyncio.sleep(3)
|
123
123
|
file_object = self.client.files.get(
|
124
124
|
name=file_object.name,
|
125
125
|
config={"http_options": {"timeout": 300 * 1000}}
|
@@ -127,10 +127,12 @@ class Completions(object):
|
|
127
127
|
|
128
128
|
logger.debug(file_object)
|
129
129
|
if file_object.state.name == "ACTIVE":
|
130
|
-
yield f"
|
130
|
+
yield f"100%) ✅️✅️✅️{time.time() - s:.2f}s.\n\n"
|
131
131
|
break
|
132
132
|
else:
|
133
|
-
yield f"{min(i * 5, 99)}%
|
133
|
+
yield f"{min(i * 5, 99)}%"
|
134
|
+
|
135
|
+
await asyncio.sleep(3)
|
134
136
|
|
135
137
|
# while file_object.state.name == "ACTIVE":
|
136
138
|
# logger.debug(file_object)
|
@@ -142,12 +144,16 @@ class Completions(object):
|
|
142
144
|
|
143
145
|
logger.debug(contents)
|
144
146
|
|
145
|
-
|
147
|
+
if any(i in request.model for i in {"gemini-2.5-pro", "gemini-2.5-flash"}): # 默认开启思考
|
148
|
+
request.reasoning_effort = "low"
|
149
|
+
|
150
|
+
chat = self.client.aio.chats.create(
|
146
151
|
model=request.model,
|
147
152
|
config=GenerateContentConfig(
|
148
153
|
response_modalities=['Text'],
|
149
|
-
system_instruction=request.system_instruction,
|
150
|
-
thinking_config=ThinkingConfig(thinking_budget=request.reasoning_effort and 1024 or 0)
|
154
|
+
system_instruction=request.system_instruction or "请根据用户的语言偏好自动调整回复语言",
|
155
|
+
thinking_config=ThinkingConfig(thinking_budget=request.reasoning_effort and 1024 or 0),
|
156
|
+
# thinking_config=ThinkingConfig(thinking_budget=1024),
|
151
157
|
)
|
152
158
|
)
|
153
159
|
for i in range(5):
|
@@ -373,8 +379,8 @@ if __name__ == '__main__':
|
|
373
379
|
# {"type": "text", "text": "https://oss.ffire.cc/files/nsfw.jpg 移除右下角的水印"},
|
374
380
|
# {"type": "text", "text": "https://oss.ffire.cc/files/kling_watermark.png 总结下"},
|
375
381
|
# {"type": "text", "text": "https://oss.ffire.cc/files/nsfw.jpg 总结下"},
|
376
|
-
|
377
|
-
{"type": "text", "text": "https://v3.fal.media/files/penguin/Rx-8V0MVgkVZM6PJ0RiPD_douyin.mp4 总结下"},
|
382
|
+
{"type": "text", "text": "https://lmdbk.com/5.mp4 总结下"},
|
383
|
+
# {"type": "text", "text": "https://v3.fal.media/files/penguin/Rx-8V0MVgkVZM6PJ0RiPD_douyin.mp4 总结下"},
|
378
384
|
|
379
385
|
# {"type": "text", "text": "总结下"},
|
380
386
|
# {"type": "image_url", "image_url": {"url": url}},
|
@@ -393,6 +399,8 @@ if __name__ == '__main__':
|
|
393
399
|
# model="gemini-all",
|
394
400
|
# model="gemini-2.0-flash-exp-image-generation",
|
395
401
|
model="gemini-2.0-flash",
|
402
|
+
# model="gemini-2.5-flash-preview-04-17",
|
403
|
+
# model="gemini-2.5-flash-preview-04-17",
|
396
404
|
|
397
405
|
messages=[
|
398
406
|
{
|
@@ -407,7 +415,10 @@ if __name__ == '__main__':
|
|
407
415
|
# arun(Completions(api_key=api_key).create_for_search(request))
|
408
416
|
|
409
417
|
# arun(Completions(api_key=api_key).create_for_images(request))
|
410
|
-
arun(Completions(
|
418
|
+
arun(Completions().create_for_files(request))
|
419
|
+
|
420
|
+
# arun(Completions(api_key=api_key).create_for_files(request))
|
421
|
+
|
411
422
|
# request = ImageRequest(
|
412
423
|
# prompt="https://oss.ffire.cc/files/nsfw.jpg 移除右下角 白色的水印",
|
413
424
|
# # prompt="画条可爱的狗",
|
meutils/apis/images/recraft.py
CHANGED
@@ -43,9 +43,14 @@ async def get_access_token(token: str):
|
|
43
43
|
|
44
44
|
|
45
45
|
async def edit_image(image, task: Literal["vectorize", "super_resolution",] = "super_resolution"):
|
46
|
-
token = await get_next_token_for_polling(
|
47
|
-
|
46
|
+
token = await get_next_token_for_polling(
|
47
|
+
feishu_url=FEISHU_URL,
|
48
|
+
check_token=check_token,
|
49
|
+
from_redis=True,
|
50
|
+
min_points=1
|
51
|
+
)
|
48
52
|
token = await get_access_token(token)
|
53
|
+
|
49
54
|
headers = {"Authorization": f"Bearer {token}"}
|
50
55
|
|
51
56
|
data_url = await to_base64(image, content_type="image/png")
|
@@ -71,9 +76,14 @@ async def edit_image(image, task: Literal["vectorize", "super_resolution",] = "s
|
|
71
76
|
|
72
77
|
# @retrying()
|
73
78
|
async def generate(request: RecraftImageRequest, token: Optional[str] = None):
|
74
|
-
token =
|
75
|
-
|
79
|
+
token = await get_next_token_for_polling(
|
80
|
+
feishu_url=FEISHU_URL,
|
81
|
+
check_token=check_token,
|
82
|
+
from_redis=True,
|
83
|
+
min_points=1
|
84
|
+
)
|
76
85
|
token = await get_access_token(token)
|
86
|
+
|
77
87
|
headers = {"Authorization": f"Bearer {token}"}
|
78
88
|
# params = {"project_id": "26016b99-3ad0-413b-821b-5f884bd9454e"} # project_id 是否是必要的
|
79
89
|
params = {} # project_id 是否是必要的
|
@@ -91,7 +101,7 @@ async def generate(request: RecraftImageRequest, token: Optional[str] = None):
|
|
91
101
|
}
|
92
102
|
logger.debug(params)
|
93
103
|
|
94
|
-
response = await client.get("/poll_recraft", params=params)
|
104
|
+
response = await client.get("/poll_recraft", params=params) # 重试
|
95
105
|
logger.debug(response.text)
|
96
106
|
logger.debug(response.status_code)
|
97
107
|
|
@@ -184,12 +194,13 @@ if __name__ == '__main__':
|
|
184
194
|
**data
|
185
195
|
)
|
186
196
|
token = None
|
187
|
-
|
188
|
-
|
197
|
+
with timer():
|
198
|
+
arun(generate(request, token=token))
|
199
|
+
|
189
200
|
# with timer():
|
190
201
|
# arun(edit_image("https://oss.ffire.cc/files/kling_watermark.png"))
|
191
202
|
# tokens = [token]
|
192
203
|
#
|
193
|
-
tokens = list(arun(aget_spreadsheet_values(feishu_url=FEISHU_URL, to_dataframe=True))[0]) | xfilter_
|
194
|
-
#
|
195
|
-
r = arun(check_token(tokens))
|
204
|
+
# tokens = list(arun(aget_spreadsheet_values(feishu_url=FEISHU_URL, to_dataframe=True))[0]) | xfilter_
|
205
|
+
# #
|
206
|
+
# r = arun(check_token(tokens[:5]))
|
meutils/apis/jimeng/__init__.py
CHANGED
meutils/apis/oneapi/channel.py
CHANGED
@@ -11,6 +11,12 @@
|
|
11
11
|
from meutils.pipe import *
|
12
12
|
from meutils.schemas.oneapi import BASE_URL, GROUP_RATIO
|
13
13
|
|
14
|
+
headers = {
|
15
|
+
'authorization': f'Bearer {os.getenv("CHATFIRE_ONEAPI_TOKEN")}',
|
16
|
+
'new-api-user': '1',
|
17
|
+
'rix-api-user': '1',
|
18
|
+
}
|
19
|
+
|
14
20
|
|
15
21
|
async def edit_channel(models, token: Optional[str] = None):
|
16
22
|
token = token or os.environ.get("CHATFIRE_ONEAPI_TOKEN")
|
@@ -65,5 +71,77 @@ async def edit_channel(models, token: Optional[str] = None):
|
|
65
71
|
logger.debug(bjson(response.json()))
|
66
72
|
|
67
73
|
|
74
|
+
# todo: 分批
|
75
|
+
async def create_or_update_channel(api_key, base_url: Optional[str] = "https://api.ffire.cc"):
|
76
|
+
if isinstance(api_key, list):
|
77
|
+
api_keys = api_key | xgroup(128) # [[],]
|
78
|
+
else:
|
79
|
+
api_keys = [[api_key]]
|
80
|
+
|
81
|
+
payload = {
|
82
|
+
# "id": 7493,
|
83
|
+
"type": 8,
|
84
|
+
# "key": "AIzaSyCXWV19FRM4XX0KHmpR9lYUz9i1wxQTYUg",
|
85
|
+
"openai_organization": "",
|
86
|
+
"test_model": "",
|
87
|
+
"status": 1,
|
88
|
+
"name": "gemini",
|
89
|
+
"weight": 0,
|
90
|
+
# "created_time": 1745554162,
|
91
|
+
# "test_time": 1745554168,
|
92
|
+
# "response_time": 575,
|
93
|
+
"base_url": "https://g.chatfire.cn/v1beta/openai/chat/completions",
|
94
|
+
# "other": "",
|
95
|
+
# "balance": 0,
|
96
|
+
# "balance_updated_time": 0,
|
97
|
+
"models": "gemini-2.0-flash",
|
98
|
+
# "used_quota": 0,
|
99
|
+
"model_mapping": "",
|
100
|
+
# "status_code_mapping": "",
|
101
|
+
# "priority": 0,
|
102
|
+
# "auto_ban": 1,
|
103
|
+
# "other_info": "",
|
104
|
+
# "settings": "",
|
105
|
+
"tag": "gemini",
|
106
|
+
# "setting": None,
|
107
|
+
# "param_override": "\n {\n \"seed\": null,\n \"frequency_penalty\": null,\n \"presence_penalty\": null,\n \"max_tokens\": null\n }\n ",
|
108
|
+
"group": "default,gemini,gemini-pro",
|
109
|
+
"groups": [
|
110
|
+
"default"
|
111
|
+
]
|
112
|
+
}
|
113
|
+
|
114
|
+
for api_key in tqdm(api_keys):
|
115
|
+
payload['key'] = '\n'.join(api_key)
|
116
|
+
# logger.debug(payload)
|
117
|
+
async with httpx.AsyncClient(base_url=base_url, headers=headers, timeout=100) as client:
|
118
|
+
response = await client.post("/api/channel/", json=payload)
|
119
|
+
response.raise_for_status()
|
120
|
+
logger.debug(response.json())
|
121
|
+
|
122
|
+
|
123
|
+
async def delete_channel(id, base_url: Optional[str] = "https://api.ffire.cc"):
|
124
|
+
ids = id
|
125
|
+
if isinstance(id, str):
|
126
|
+
ids = [id]
|
127
|
+
|
128
|
+
for _ids in tqdm(ids | xgroup(128)):
|
129
|
+
payload = {
|
130
|
+
"ids": list(_ids)
|
131
|
+
}
|
132
|
+
async with httpx.AsyncClient(base_url=base_url, headers=headers, timeout=100) as client:
|
133
|
+
response = await client.post(f"/api/channel/batch", json=payload)
|
134
|
+
response.raise_for_status()
|
135
|
+
logger.debug(response.json())
|
136
|
+
|
137
|
+
|
68
138
|
if __name__ == '__main__':
|
69
|
-
|
139
|
+
from meutils.config_utils.lark_utils import get_series
|
140
|
+
|
141
|
+
FEISHU_URL = "https://xchatllm.feishu.cn/sheets/Bmjtst2f6hfMqFttbhLcdfRJnNf?sheet=kfKGzt"
|
142
|
+
|
143
|
+
tokens = arun(get_series(FEISHU_URL))
|
144
|
+
# arun(create_or_update_channel(tokens[:1]))
|
145
|
+
arun(create_or_update_channel(tokens))
|
146
|
+
|
147
|
+
# arun(delete_channel(range(7000, 9000)))
|
@@ -0,0 +1,75 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
# @Project : AI. @by PyCharm
|
4
|
+
# @File : demo
|
5
|
+
# @Time : 2025/4/24 19:51
|
6
|
+
# @Author : betterme
|
7
|
+
# @WeChat : meutils
|
8
|
+
# @Software : PyCharm
|
9
|
+
# @Description :
|
10
|
+
|
11
|
+
from meutils.pipe import *
|
12
|
+
|
13
|
+
data = {
|
14
|
+
"id": 1230,
|
15
|
+
"type": 1,
|
16
|
+
"key": "",
|
17
|
+
"openai_organization": "",
|
18
|
+
"test_model": "",
|
19
|
+
"status": 1,
|
20
|
+
"name": "x",
|
21
|
+
"weight": 11,
|
22
|
+
"created_time": 1745495162,
|
23
|
+
"test_time": 0,
|
24
|
+
"response_time": 0,
|
25
|
+
"base_url": "https://huggingface.co/Qwen/Qwen2.5-Omni-7B",
|
26
|
+
"other": "",
|
27
|
+
"balance": 0,
|
28
|
+
"balance_updated_time": 0,
|
29
|
+
"models": "m1,m2",
|
30
|
+
"group": "default",
|
31
|
+
"used_quota": 0,
|
32
|
+
"model_mapping": "{\n \"gpt-3.5-turbo\": \"gpt-3.5-turbo-0125\"\n}",
|
33
|
+
"status_code_mapping": "",
|
34
|
+
"priority": 1,
|
35
|
+
"auto_ban": 1,
|
36
|
+
"other_info": "",
|
37
|
+
"settings": "",
|
38
|
+
"tag": "test",
|
39
|
+
"setting": "",
|
40
|
+
"param_override": "{\"temperature\": 0\n}"
|
41
|
+
}
|
42
|
+
print(dict_to_model(data))
|
43
|
+
|
44
|
+
|
45
|
+
class Channel(BaseModel):
|
46
|
+
id: Optional[int] = None
|
47
|
+
name: str = 'name'
|
48
|
+
type: int = '1' # 8 自定义
|
49
|
+
key: str = ''
|
50
|
+
openai_organization: str = ''
|
51
|
+
test_model: str = ''
|
52
|
+
status: int = 1 # 0 禁用 1 启用
|
53
|
+
|
54
|
+
priority: int = 0
|
55
|
+
weight: int = 0
|
56
|
+
|
57
|
+
test_time: int = 0
|
58
|
+
response_time: int = '0'
|
59
|
+
base_url: str = 'https://huggingface.co/Qwen/Qwen2.5-Omni-7B'
|
60
|
+
other: str = ''
|
61
|
+
balance: int = '0'
|
62
|
+
balance_updated_time: int = '0'
|
63
|
+
models: str = 'm1,m2'
|
64
|
+
group: str = 'default'
|
65
|
+
used_quota: int = '0'
|
66
|
+
model_mapping: str = '{"gpt-3.5-turbo": "gpt-3.5-turbo-0125"}'
|
67
|
+
status_code_mapping: str = ''
|
68
|
+
auto_ban: int = '1'
|
69
|
+
other_info: str = ''
|
70
|
+
settings: str = ''
|
71
|
+
tag: str = 'tag'
|
72
|
+
setting: str = ''
|
73
|
+
param_override: str = '{"temperature": 0}'
|
74
|
+
|
75
|
+
created_time: int = '1745495162'
|
meutils/apis/oneapi/log.py
CHANGED
@@ -11,11 +11,13 @@
|
|
11
11
|
from meutils.pipe import *
|
12
12
|
from meutils.schemas.oneapi import BASE_URL
|
13
13
|
|
14
|
+
BASE_URL = "https://api.ffire.cc"
|
14
15
|
|
15
16
|
|
16
17
|
async def get_one_log(api_key: str):
|
17
18
|
async with httpx.AsyncClient(base_url=BASE_URL) as client:
|
18
19
|
response = await client.get("/api/log/token", params={"key": api_key})
|
20
|
+
logger.debug(response.text)
|
19
21
|
# {
|
20
22
|
# "data": ...,
|
21
23
|
# 'message': '',
|
@@ -44,4 +46,4 @@ async def get_one_log(api_key: str):
|
|
44
46
|
|
45
47
|
|
46
48
|
if __name__ == '__main__':
|
47
|
-
arun(get_one_log("sk-
|
49
|
+
arun(get_one_log("sk-Qpwj5NcifMz00FBbS2MDa7Km6JCW70UAi0ImJeX9UKfnTviC"))
|
meutils/apis/oneapi/user.py
CHANGED
@@ -113,4 +113,4 @@ if __name__ == '__main__':
|
|
113
113
|
|
114
114
|
# arun(get_api_key_log('sk-gpoH1z3G6nHovD8MY40i6xx5tsC1vbh7B3Aao2jmejYNoKhv'))
|
115
115
|
# arun(get_user_money("sk-LlB4W38z9kv5Wy1c3ceeu4PHeIWs6bbWsjr8Om31jYvsucRv"))
|
116
|
-
arun(get_user_from_api_key('sk-
|
116
|
+
arun(get_user_from_api_key('sk-ROgrPPp2TUdGUC8aNOBwO8Lv0AHZjECKjoT7rBbHbvAKVTKA'))
|
meutils/apis/search/metaso.py
CHANGED
@@ -195,7 +195,9 @@ if __name__ == '__main__':
|
|
195
195
|
request = ChatCompletionRequest(
|
196
196
|
# model="deepseek-search",
|
197
197
|
# model="deepseek-r1-search",
|
198
|
-
model="11meta-deepresearch",
|
198
|
+
# model="11meta-deepresearch",
|
199
|
+
model="meta-search",
|
200
|
+
|
199
201
|
# model="ai-search",
|
200
202
|
# model="ai-search:scholar",
|
201
203
|
# model="ai-search-pro:scholar",
|
@@ -207,14 +207,17 @@ async def get_next_token(
|
|
207
207
|
|
208
208
|
if check_token is None:
|
209
209
|
logger.info("写回队列「跳过核验」")
|
210
|
+
|
210
211
|
await redis_aclient.rpush(feishu_url, token)
|
211
212
|
return token
|
212
213
|
elif await check_token(token, threshold=min_points):
|
213
214
|
logger.info("写回队列「大于最小消耗」")
|
215
|
+
|
214
216
|
await redis_aclient.rpush(feishu_url, token)
|
215
217
|
return token
|
216
218
|
elif await check_token(token):
|
217
219
|
logger.info("不写回队列「最后一次消耗」")
|
220
|
+
|
218
221
|
return token
|
219
222
|
|
220
223
|
logger.info("不写回队列「积分不够」")
|
meutils/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2025.04.
|
1
|
+
2025.04.25.20.47.56
|
meutils/io/files_utils.py
CHANGED
@@ -64,11 +64,13 @@ async def to_bytes(
|
|
64
64
|
|
65
65
|
if isinstance(file, bytes):
|
66
66
|
logger.debug(f"FileType: BYTES")
|
67
|
+
|
67
68
|
return file
|
68
69
|
|
69
70
|
elif isinstance(file, str):
|
70
71
|
if file.startswith('http'):
|
71
72
|
logger.debug(f"FileType: HTTP")
|
73
|
+
|
72
74
|
async with AsyncClient(headers=headers or {}, timeout=300) as cilent: # todo: 缓存 根据大小
|
73
75
|
resp = await cilent.get(file)
|
74
76
|
file_bytes = resp.content
|
@@ -85,6 +87,7 @@ async def to_bytes(
|
|
85
87
|
|
86
88
|
else:
|
87
89
|
logger.debug(f"FileType: MAY BASE64")
|
90
|
+
|
88
91
|
file_bytes = base64_to_bytes(file)
|
89
92
|
|
90
93
|
return file_bytes
|
@@ -183,7 +183,7 @@ if __name__ == '__main__':
|
|
183
183
|
|
184
184
|
request = CompletionRequest(
|
185
185
|
# model="qwen-turbo-2024-11-01",
|
186
|
-
model="qwen-max-latest",
|
186
|
+
# model="qwen-max-latest",
|
187
187
|
# model="qvq-max-2025-03-25",
|
188
188
|
# model="qvq-72b-preview-0310",
|
189
189
|
# model="qwen2.5-omni-7b",
|
@@ -195,7 +195,7 @@ if __name__ == '__main__':
|
|
195
195
|
|
196
196
|
# model="qwen2.5-vl-72b-instruct",
|
197
197
|
|
198
|
-
|
198
|
+
model="qwen-plus-latest",
|
199
199
|
|
200
200
|
max_tokens=8000,
|
201
201
|
|