MeUtils 2025.4.11.19.33.11__py3-none-any.whl → 2025.4.14.18.6.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-2025.4.11.19.33.11.dist-info → MeUtils-2025.4.14.18.6.48.dist-info}/METADATA +263 -263
- {MeUtils-2025.4.11.19.33.11.dist-info → MeUtils-2025.4.14.18.6.48.dist-info}/RECORD +23 -20
- examples/_openaisdk/4v.py +3 -3
- examples/_openaisdk/openai_chatfire.py +3 -2
- meutils/apis/images/edits.py +20 -13
- meutils/apis/images/recraft.py +35 -8
- meutils/apis/proxy/ips.py +5 -7
- meutils/apis/proxy/kuaidaili.py +24 -0
- meutils/apis/siliconflow/images.py +4 -3
- meutils/data/VERSION +1 -1
- meutils/io/files_utils.py +4 -0
- meutils/llm/completions/chat_gemini.py +8 -7
- meutils/llm/completions/qwenllm.py +12 -8
- meutils/llm/models.py +114 -0
- meutils/llm/openai_polling/chat.py +53 -5
- meutils/oss/ali.py +78 -0
- meutils/schemas/image_types.py +1 -1
- meutils/schemas/oneapi/common.py +16 -9
- meutils/schemas/openai_types.py +2 -2
- {MeUtils-2025.4.11.19.33.11.dist-info → MeUtils-2025.4.14.18.6.48.dist-info}/LICENSE +0 -0
- {MeUtils-2025.4.11.19.33.11.dist-info → MeUtils-2025.4.14.18.6.48.dist-info}/WHEEL +0 -0
- {MeUtils-2025.4.11.19.33.11.dist-info → MeUtils-2025.4.14.18.6.48.dist-info}/entry_points.txt +0 -0
- {MeUtils-2025.4.11.19.33.11.dist-info → MeUtils-2025.4.14.18.6.48.dist-info}/top_level.txt +0 -0
@@ -71,7 +71,7 @@ examples/Time-Extractor/TimeUnit.py,sha256=yx-SS9sxSjSUGiu1H8eTbP4vqAHrNyQcddioM
|
|
71
71
|
examples/Time-Extractor/__init__.py,sha256=hjNi8tWPOBTke6GHlxpsOrufCRdAHmYs2yBquql9X7c,156
|
72
72
|
examples/Time-Extractor/setup.py,sha256=ENYhj1_uJ7z_F3jrz8FR8w5u2SEXrZpl5GXEELUymLk,811
|
73
73
|
examples/Time-Extractor/resource/__init__.py,sha256=0HHkZVghckIg5LkGMziooZ8TUqfSQFA6j62BN9KyFp0,91
|
74
|
-
examples/_openaisdk/4v.py,sha256=
|
74
|
+
examples/_openaisdk/4v.py,sha256=vYfTiXTdTI55iaTDgGgEi6JKpXcQkCpd40jsOWIQItk,3689
|
75
75
|
examples/_openaisdk/__init__.py,sha256=5TNibGR-ETncXVWoevqYJ0m2yo1GOxRx3hSu2qWAQNo,271
|
76
76
|
examples/_openaisdk/_openai_chatfire.py,sha256=hvz7Xw329xDDRHbenJohyhK5GGlXr0lA9dplXiwp4Q0,1240
|
77
77
|
examples/_openaisdk/baichuan.py,sha256=xmNFc64T02r9wE0VSOG0B21wJJmlrecKVVCelhs2Dt4,890
|
@@ -98,7 +98,7 @@ examples/_openaisdk/openai_audio_gpt.py,sha256=7I8Iq1vNnBrxIZ5vfo40oO9zKrrUZbyHL
|
|
98
98
|
examples/_openaisdk/openai_baichuan.py,sha256=-xhHovkFmWOTX25CJjIon0my-ocmwfAZJu1C0eS80Xs,1614
|
99
99
|
examples/_openaisdk/openai_baidu.py,sha256=qnrxP66lY7Qf2jEbFEHrt0FrR5_Aji1AgwSI_46IabY,1969
|
100
100
|
examples/_openaisdk/openai_cache.py,sha256=89GbJ1QlqQbVxlUeuFgEbwDYHOkum7BK0zB-CqmDAZU,726
|
101
|
-
examples/_openaisdk/openai_chatfire.py,sha256=
|
101
|
+
examples/_openaisdk/openai_chatfire.py,sha256=fQHQ-Z-JpJ7ld2OwIxEF42jOJPQr1eWU6labye44Jiw,19052
|
102
102
|
examples/_openaisdk/openai_chatfire_all.py,sha256=DaiI1NfDeK655QvXyczkgXK9Awxp7NBe71LHA7trxGE,4831
|
103
103
|
examples/_openaisdk/openai_dashscope.py,sha256=m9SjQpaNgYwr4Qd3XusWbJBGp5ZTtpuB40QopejxPKQ,1029
|
104
104
|
examples/_openaisdk/openai_deepinfra.py,sha256=innI4BT15dZEqheqDHG4lHDczY1QC7t2Whcavi1pcz0,1195
|
@@ -392,9 +392,9 @@ meutils/apis/hunyuan/image_tools.py,sha256=SYovMKvv0QCPAYnIPqpDfXyVSOvyEuFlNNCA1
|
|
392
392
|
meutils/apis/images/__init__.py,sha256=hs7HUJZvw_3DAtoapPnbZsEb4ng1p0a6fJGFFWwUcUk,272
|
393
393
|
meutils/apis/images/deepinfra.py,sha256=lMqfU0LIXEzHiAS31dCcoTnPIE6tpoDJhq61H0TVJPg,3219
|
394
394
|
meutils/apis/images/demo.py,sha256=Cjk-EKMKbp44czykW_44qR0TzElX8nNCALqXBBw5sJA,4405
|
395
|
-
meutils/apis/images/edits.py,sha256=
|
395
|
+
meutils/apis/images/edits.py,sha256=IU9rvUgWPdCwNG5subFbcWZVPmioreB730s-wlPSQNk,10231
|
396
396
|
meutils/apis/images/eidt.py,sha256=s8IBbCjwwoogIUf-d2O7nkawUmly9n19nvLYPaLEeg4,1217
|
397
|
-
meutils/apis/images/recraft.py,sha256=
|
397
|
+
meutils/apis/images/recraft.py,sha256=pWWzPnOMoccMXkzaJ5k8xpUWggVP4ccbcfFHm9hd5GA,71900
|
398
398
|
meutils/apis/images/flux/__init__.py,sha256=W_PZabQm6EmtJYmzEiEpL_WCXTAW0AiJ-t_n5UTrE8c,271
|
399
399
|
meutils/apis/images/flux/fluxpro.py,sha256=NFl9t9C3R3jsNJpez4o9tOz3r-fjRXj-vKMxCSTRDTU,4022
|
400
400
|
meutils/apis/images/flux/mystic.py,sha256=cUkqaMAbd3dSBCvFEoNBBoEoWCGzvBJWPEkEq1Q8xzw,3616
|
@@ -447,7 +447,8 @@ meutils/apis/oneapi/utils.py,sha256=p7zI7QYPqTaVHjk4jLJxb6EsLDNQQ6DVp_wZTgE8d2Y,
|
|
447
447
|
meutils/apis/pixverse/__init__.py,sha256=WiboEUfJ_3Hs2WI3OymEspx8_ZSTgMglxTJd97Qk7qo,271
|
448
448
|
meutils/apis/pixverse/pixverse.py,sha256=dvnyYVUXCEY_cLnmX9lvq9TesvplCMCuJmmP7ShchQk,5534
|
449
449
|
meutils/apis/proxy/__init__.py,sha256=by7_6GT3xeDjAWLLqbw8uvGaZ3RdprEW-zJ2DFLOdwA,271
|
450
|
-
meutils/apis/proxy/ips.py,sha256=
|
450
|
+
meutils/apis/proxy/ips.py,sha256=3McLniROteSBqAtcMH8xKbUBfhVc4ZyGuRwMvgEryKg,5023
|
451
|
+
meutils/apis/proxy/kuaidaili.py,sha256=tJB4k6uKWwnn4IYXSbnKNZcKZ1HRPVq-9hIpikubXjU,670
|
451
452
|
meutils/apis/remini/__init__.py,sha256=8TbAnbI_bDfH8g0Y9EHXHBum7C0rZt9MzgAAz_MbAeI,271
|
452
453
|
meutils/apis/remini/remini.py,sha256=bJjvtqrCNlAu7No4gYGjoWAM0ch6dCsofYSy2jPZrXg,4239
|
453
454
|
meutils/apis/replicateai/__init__.py,sha256=PK7e7-xhn5aj5WOyGHLzpsHQvpeM5uTOiMylvj40ZmU,272
|
@@ -467,7 +468,7 @@ meutils/apis/search/zhipu_web_search.py,sha256=L0eV9pINynX7PgAw0fR419DYvak9jbbGf
|
|
467
468
|
meutils/apis/siliconflow/__init__.py,sha256=DQ-A6wAWGna49pmyGhcIWgc2zx6TN9DfQmSUdAW7qjk,241
|
468
469
|
meutils/apis/siliconflow/audio.py,sha256=pk1OROATtAURPQ6VkswmR5gJFOFYJJPnjp-boDAf8X0,2017
|
469
470
|
meutils/apis/siliconflow/image_to_image.py,sha256=Clk-2hACzoUP0yTHnxhlV5MA_HsVdcPuhrX41YARWPM,89439
|
470
|
-
meutils/apis/siliconflow/images.py,sha256=
|
471
|
+
meutils/apis/siliconflow/images.py,sha256=6KwzFbQyFuPwrUxzq4uxv2yrDRSt7vNMH7pMNmpy5_s,7321
|
471
472
|
meutils/apis/siliconflow/rerankers.py,sha256=GuKT33MmAiVULqNaAO9IIy1Zp570-kYJ6xP03eLCp5Y,1259
|
472
473
|
meutils/apis/siliconflow/text_to_image.py,sha256=rDxk6NIj4TjigcSPVDZknQR9nUpK5CTJBXc3KjI1Z8Y,4457
|
473
474
|
meutils/apis/siliconflow/utils.py,sha256=Awe0V7Mkceop1vWWrw9901cKQ6HHntIn8HbIG0fEo40,2091
|
@@ -551,7 +552,7 @@ meutils/config_utils/lark_utils/demo.py,sha256=3g0Fs7oLaeW75T60gYWMLgyNg1OnfOjfH
|
|
551
552
|
meutils/config_utils/lark_utils/x.py,sha256=MlMQGhehP9xMEgetxVCX68XFaosfKoW1JA5cZ3JqN2w,1857
|
552
553
|
meutils/crawlers/__init__.py,sha256=TBU4xA-IOsHV-0yIkW7YXxn_QT7TT8NncqxO7IykEfs,271
|
553
554
|
meutils/data/SimHei.ttf,sha256=-XEnekS5yHP_URkT4XBI2w22ylV-KxudhkeIYFbrILA,10062565
|
554
|
-
meutils/data/VERSION,sha256=
|
555
|
+
meutils/data/VERSION,sha256=ESihjy1gdPzIPuKMCOeDWR-z3KzqmyzSrT7XIst5u7M,19
|
555
556
|
meutils/data/_FLAG,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
556
557
|
meutils/data/_SUCCESS,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
557
558
|
meutils/data/__init__.py,sha256=Hfwkkxs4zHqKhxht0YrhS566a9P5axtmgNvM5wF8ceQ,243
|
@@ -598,7 +599,7 @@ meutils/init/evn.py,sha256=GPw9Un8YbgYJmjwd-uYWQ8JeVr6pRxwyYbDv3W8fb1s,1588
|
|
598
599
|
meutils/init/oo.py,sha256=jXWaCWWFYVPGgTIas47Z3J7sIq-CD7DyK6fKDBsq8GA,12884
|
599
600
|
meutils/io/__init__.py,sha256=uW43ZfdWu7adRvwvcTzUGtn4CseRmbzEJdlZV-oqHEA,2107
|
600
601
|
meutils/io/_openai_files.py,sha256=UIiu6Zg7iSFIn1xIcpLznFlnfCxAJFGuvuPtxvTNHfI,1005
|
601
|
-
meutils/io/files_utils.py,sha256=
|
602
|
+
meutils/io/files_utils.py,sha256=6u_xOxf2GgcHaIxGZzwZR3htWbCyjzfQ0h8R7jw6YRo,8480
|
602
603
|
meutils/io/image.py,sha256=BJmYzx7o66X7C32gOfVmfr5tBRXOi0IYQY7BpGLsGrg,6926
|
603
604
|
meutils/io/minio_utils.py,sha256=i1YuxwDJzLse0smMXuPqnD1wirBBb8psmB_kd1oPoVU,1274
|
604
605
|
meutils/io/openai_files.py,sha256=wi4qp-olva8aF6AfBiUBfb_QlHzHolJJbH4UbHpRrB0,6032
|
@@ -637,10 +638,11 @@ meutils/llm/check_utils.py,sha256=r7_7cg8yE6j4AE58JPaSjxxMNXoIzcE8URm-k5vygn0,54
|
|
637
638
|
meutils/llm/clients.py,sha256=ksj8Fb5b2Y0dc5rUpzg3aVChPApblsaT5Zx9KWlXA5Q,2412
|
638
639
|
meutils/llm/demo.py,sha256=gyGjTxuNFMOa1X4CXaChkq0lcjbKiRsnSRhkeMvsoQk,3822
|
639
640
|
meutils/llm/mappers.py,sha256=ZQLl3OuD06kVMP8bwIpVgAB1UVzMJWUJiZ3vgk-ZjeI,303
|
641
|
+
meutils/llm/models.py,sha256=dDdU_WzcQGdgaFOYtMJpDYmt5uKFKEz2pc0guqNVkSk,3175
|
640
642
|
meutils/llm/utils.py,sha256=4u3b8VO3wX3xKny1AdV4579qXux1YA4k5gI-CYPtx0o,4279
|
641
643
|
meutils/llm/x.py,sha256=ETvKKDTmDNrik0K2-_a_SEQxyV4X4-fy0JPrAOLNPv4,1732
|
642
644
|
meutils/llm/completions/__init__.py,sha256=q5FEYPpo2f_P44Ghdh9fkrmqZLX2Asso8p-nf-ZTqks,244
|
643
|
-
meutils/llm/completions/chat_gemini.py,sha256=
|
645
|
+
meutils/llm/completions/chat_gemini.py,sha256=0x9HQxuDAHoWJ79JoaEKKWVNy4PRyd-Et-j8V93NqkY,4395
|
644
646
|
meutils/llm/completions/chat_plus.py,sha256=RPYQqx4vc57gevcz0gUS7QPvGm0M12ktAspMKJtoeuk,7727
|
645
647
|
meutils/llm/completions/chat_spark.py,sha256=FoI8wvWBp2ckM1DFayKbUg7jkzF6HCbkJTrEYY6wlgc,9570
|
646
648
|
meutils/llm/completions/chat_videos.py,sha256=P3Yz34dkNlxCxzOuKHJ9pHIA4UXK3Y5RXPzVnQjb9rc,2915
|
@@ -650,7 +652,7 @@ meutils/llm/completions/delilegal.py,sha256=mr53ps7I33SC8Fjy4rma-xoNF-mLgwdZfHgd
|
|
650
652
|
meutils/llm/completions/dify.py,sha256=dqL_8uxAp2d8M00pkyh2I30tflwi4pUyX-V6pwe3_BA,3048
|
651
653
|
meutils/llm/completions/kimi.py,sha256=TSkLObebIAb_oivOMq3aKx9qoXcMy611_g2yIKex9eo,1541
|
652
654
|
meutils/llm/completions/modelscope.py,sha256=umPlJuHSL2RR0oNdTIAqts8iqEmGp_MR6Vh49g-UZuc,271
|
653
|
-
meutils/llm/completions/qwenllm.py,sha256=
|
655
|
+
meutils/llm/completions/qwenllm.py,sha256=MvoNyueM4oLRRPxOEPxpohTq_aClUD4qV4rQ5QGk0Yk,10757
|
654
656
|
meutils/llm/completions/rag.py,sha256=cpQ1aZX2QI1QDfFpODTxWHPYglK6_3qrlUM_KHLBNhc,1112
|
655
657
|
meutils/llm/completions/reasoner.py,sha256=rPIxW1iuvLuGhcOa6PkfcJmrTKtJV-8wRKfA09X09tg,6169
|
656
658
|
meutils/llm/completions/tryblend.py,sha256=NfVRktn1QiE2k60PzEI-LmKuxZCc7mtL_KlsrVcZg4k,8957
|
@@ -668,7 +670,7 @@ meutils/llm/completions/rag/qwen.py,sha256=1dBNLLbQDRsM-7EGaStcWFU8HRa-rp3RxJ9cp
|
|
668
670
|
meutils/llm/completions/rag/rag.py,sha256=mnC4bZUMuNYuPFXMBqXMofj_ms8uP5MMw1leJ5jXA_k,1209
|
669
671
|
meutils/llm/functions/__init__.py,sha256=It6pcNwRBSh3Em45ooi61lc5tFg8eOYv0BvEFuRjSGQ,271
|
670
672
|
meutils/llm/openai_polling/__init__.py,sha256=qmAMITPtrTD-y57RiJXewuOic7iLKBhx8mz5uvcxsy8,270
|
671
|
-
meutils/llm/openai_polling/chat.py,sha256=
|
673
|
+
meutils/llm/openai_polling/chat.py,sha256=a5X6WDDIpGHDYtmLTQOvQzLS_d-fKBpr809TTO-qt9g,3220
|
672
674
|
meutils/llm/openai_polling/images.py,sha256=tQ-KoE9IoMM093MFVrtFlXFU9U6Y1t13UUHdzZRrz8w,268
|
673
675
|
meutils/llm/openai_utils/__init__.py,sha256=MWyNhP2K49oaHGEZlInZc3XlwqlStFultP8k7HDPAwk,290
|
674
676
|
meutils/llm/openai_utils/common.py,sha256=GGctOMlg8xT2A5H-8hMow0VfOZHCDdIPjd12597Nohs,9754
|
@@ -698,6 +700,7 @@ meutils/office_automation/pdm.py,sha256=AFKdLd80v0XJThs6toigSdzaW1xT02VdqbDtUWBx
|
|
698
700
|
meutils/office_automation/pdm_run.py,sha256=GF4VlAXDFQ6oGTrWsLqF4YvrbINhL9Ei8A59cYDeriE,13502
|
699
701
|
meutils/office_automation/report/__init__.py,sha256=llPWtGZdUcsw__Eym2FLOVh4Bew5PgPUDfuKS2s1RMA,244
|
700
702
|
meutils/oss/__init__.py,sha256=CdZLxZtw_3aWFrajRu2D_PhVRvnwgtFyvbY4yAbTGuo,248
|
703
|
+
meutils/oss/ali.py,sha256=pdvxbY1RebQ3zjcx2UMC-KhsCYEs50JkUudxJXJL1bo,3390
|
701
704
|
meutils/oss/minio_oss.py,sha256=pZ_YAD0gwIQtuou2Myhn1m8TcP3tn6UkNEUrbh5Eiwg,7313
|
702
705
|
meutils/oss/minio_utils.py,sha256=qQgG0x_M6wJMTJRm0zHPN-7Zm9OhOY53QWr38lHeYtQ,1301
|
703
706
|
meutils/other/__demo.py,sha256=-cAInEF7G_JbOp3v8UHHwQpSrzPk0zqz4XoFnJ81Ixs,979
|
@@ -775,7 +778,7 @@ meutils/schemas/fish_types.py,sha256=yC0ZFr3Ebh8F0OhtMsXYaIfNNvzOM2LT9YtKTaRoHGU
|
|
775
778
|
meutils/schemas/hailuo_types.py,sha256=lZ3Q07QNgxJvrX8JJvalxUsro4gGLOMQDusSEwV4EO0,7429
|
776
779
|
meutils/schemas/haimian_types.py,sha256=jGu484UviAeBgy5OIUyRY4uYCxXfv16zDPqiJQr9wNQ,1364
|
777
780
|
meutils/schemas/idphoto_types.py,sha256=nuHbpppejRSkJCiQ7YKx0Gnke0ShKZhOvdg0e7tk9-0,1074
|
778
|
-
meutils/schemas/image_types.py,sha256=
|
781
|
+
meutils/schemas/image_types.py,sha256=9VBIbIobY4c93bcXtbxDKPN26enciLSv6uEfp4Nia34,13852
|
779
782
|
meutils/schemas/jimeng_types.py,sha256=7pr3fKtUcNYuAAVgwpoiQNaSaAKSiYhVUkyS35NyrFE,977
|
780
783
|
meutils/schemas/jina_types.py,sha256=SLRRBCap2B1uXnHF7Sgnlz1Work8HvdIltjj4oVlGTk,8826
|
781
784
|
meutils/schemas/kimi_types.py,sha256=PjCgHwCDNzKasn4X6rUzvOENqKYT3xj07cgp71IdsDA,3607
|
@@ -788,7 +791,7 @@ meutils/schemas/metaso_types.py,sha256=r_X0Exs_2S3rNS71RneemMpz7EvBIOLBfAMmWMQRn
|
|
788
791
|
meutils/schemas/napkin_types.py,sha256=Kp0MbpRxzMBz4HWW4DrfcgOvHZVEF3N7P5yNeC1XGI4,2664
|
789
792
|
meutils/schemas/ocr_types.py,sha256=fZWYQAKii7HaTlSU9DS0wHyiEoOHuLnhvgoiH4Cn498,1381
|
790
793
|
meutils/schemas/openai_api_protocol.py,sha256=0GhmhUTEr54N_XCVuZI1MSxJldvwMNJjUAAAdWznw58,12716
|
791
|
-
meutils/schemas/openai_types.py,sha256=
|
794
|
+
meutils/schemas/openai_types.py,sha256=Q6-ZpaYfpr65ujreRh8EVYxnfSk_JZLPlZKDbLbnQoo,22485
|
792
795
|
meutils/schemas/pixverse_types.py,sha256=3mHg2KxvszV1U8K3GdzsODZz4uocLVRjEeJgYhX0Xmw,2347
|
793
796
|
meutils/schemas/playwright_types.py,sha256=zhZd53m1Wg4zlGtq2JM4z7Aon-u_eF6rzs-_TFYWvkU,1177
|
794
797
|
meutils/schemas/prodia_types.py,sha256=knh_lzAxMfWMoqAPmvyMweay9PmQmsoQ1X6Mj17ohWg,476
|
@@ -811,7 +814,7 @@ meutils/schemas/db/__init__.py,sha256=m1maURVoM6dIW0yt6ELZrZTzULtkHybVOSXtHNJRVI
|
|
811
814
|
meutils/schemas/db/oneapi_types.py,sha256=YanT0q9pU7dva2ZBPWjCpwGNUuifnJh0zUJJCQ9070c,3848
|
812
815
|
meutils/schemas/oneapi/__init__.py,sha256=uevbi3QAvFzN9WPbx9bYKTDyKt7P2ueZO6W0nSiD0sk,289
|
813
816
|
meutils/schemas/oneapi/_types.py,sha256=ClvAaNy3SahEN8lL8KEErHTD6HANelXUeKc_3iLfosQ,1488
|
814
|
-
meutils/schemas/oneapi/common.py,sha256=
|
817
|
+
meutils/schemas/oneapi/common.py,sha256=vYXH_VRDXq0olE4g-v1qEDE1Dbd9f8YssA-55hVOIss,33332
|
815
818
|
meutils/schemas/oneapi/icons.py,sha256=T7W5gInBJoHe62wzMimbG_UI-wn3_-rmQ1O4O2z-CQY,1089
|
816
819
|
meutils/schemas/oneapi/model_group_info.py,sha256=rGtflYJuFIjk5MsVEvK9JUR4IciX8jfErqeLqf8DIlQ,1586
|
817
820
|
meutils/schemas/oneapi/model_info.py,sha256=_uwKEPIIqm7ZYfhmpxtXB2QNsS83SpJY-OaBzvogC9w,772
|
@@ -940,9 +943,9 @@ meutils/tools/seize.py,sha256=nOKAS63w-Lbi48I0m2MPhdsokUTwxco0laPxYVmW4Mw,1064
|
|
940
943
|
meutils/tools/service_monitor.py,sha256=ibsLtBN2g2DL7ZnLJ8vhiZOiOcqTAyx711djDdBK-3M,1255
|
941
944
|
meutils/tools/sys_monitor.py,sha256=6MoyzrItqDUOSjfHcMJmMofQkEPTW36CT_aKui0rg84,429
|
942
945
|
meutils/tools/token_monitor.py,sha256=Np-YK-R4P4IPAXyZvMxwvXI4sFmNJQAQK1lSegNaYpA,997
|
943
|
-
MeUtils-2025.4.
|
944
|
-
MeUtils-2025.4.
|
945
|
-
MeUtils-2025.4.
|
946
|
-
MeUtils-2025.4.
|
947
|
-
MeUtils-2025.4.
|
948
|
-
MeUtils-2025.4.
|
946
|
+
MeUtils-2025.4.14.18.6.48.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
947
|
+
MeUtils-2025.4.14.18.6.48.dist-info/METADATA,sha256=RJ5BHvw_851AuC-A8W-y_IpxhgcBEESfLJsVRbSYPw0,32833
|
948
|
+
MeUtils-2025.4.14.18.6.48.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
949
|
+
MeUtils-2025.4.14.18.6.48.dist-info/entry_points.txt,sha256=lufZlBHRqqZKdY-ZQJ4CSZb0qhV5hQC37egZna9M7ug,357
|
950
|
+
MeUtils-2025.4.14.18.6.48.dist-info/top_level.txt,sha256=cInfxMmkgNOskurdjwP5unau4rA7Uw48nu07tYhS7KY,22
|
951
|
+
MeUtils-2025.4.14.18.6.48.dist-info/RECORD,,
|
examples/_openaisdk/4v.py
CHANGED
@@ -37,7 +37,7 @@ base64_image = image_to_base64('1.png', for_image_url=True)
|
|
37
37
|
# print(image_url2)
|
38
38
|
|
39
39
|
image_url1 = "https://img-home.csdnimg.cn/images/20201124032511.png"
|
40
|
-
|
40
|
+
image_url1 = "https://taosha01-1253585015.cos.ap-shanghai.myqcloud.com/typora/24951712814992_.pic_thumbnail.jpg"
|
41
41
|
image_url1 = image_to_base64('x.jpg', for_image_url=True)
|
42
42
|
|
43
43
|
image_urls = [
|
@@ -105,11 +105,11 @@ response = openai.chat.completions.create(
|
|
105
105
|
|
106
106
|
# model='kimi', # ocr
|
107
107
|
|
108
|
-
model = "
|
108
|
+
model = "kimi-vl-a3b-thinking",
|
109
109
|
# model = "qwen-vl-max",
|
110
110
|
|
111
111
|
messages=messages,
|
112
|
-
max_tokens=
|
112
|
+
max_tokens=1000,
|
113
113
|
temperature=0,
|
114
114
|
# response_format={"type": "json_object"}
|
115
115
|
)
|
@@ -266,8 +266,9 @@ if __name__ == '__main__':
|
|
266
266
|
# check_models(models, api_key=os.getenv("OPENAI_API_KEY_GUOCHAN") + "-725")
|
267
267
|
|
268
268
|
# check_models(models, api_key=os.getenv("OPENAI_API_KEY"))
|
269
|
-
check_models(models)
|
270
|
-
|
269
|
+
# check_models(models)
|
270
|
+
models = ['chatfire-translator']
|
271
|
+
check_models(models, api_key=os.getenv("OPENAI_API_KEY_GUOCHAN") + "-2994")
|
271
272
|
|
272
273
|
#############神奇 #############reasoning_content 神奇
|
273
274
|
|
meutils/apis/images/edits.py
CHANGED
@@ -9,6 +9,8 @@
|
|
9
9
|
# @Description :
|
10
10
|
|
11
11
|
from meutils.pipe import *
|
12
|
+
from meutils.apis.proxy.kuaidaili import get_proxy_list
|
13
|
+
|
12
14
|
from meutils.decorators.retry import retrying, IgnoredRetryException
|
13
15
|
|
14
16
|
from meutils.config_utils.lark_utils import get_next_token_for_polling
|
@@ -16,8 +18,7 @@ from meutils.schemas.image_types import ImageRequest, ImagesResponse, HunyuanIma
|
|
16
18
|
from meutils.schemas.image_types import ImageProcess
|
17
19
|
from meutils.schemas.yuanbao_types import YUANBAO_BASE_URL, FEISHU_URL as YUANBAO_FEISHU_URL
|
18
20
|
|
19
|
-
from meutils.io.files_utils import to_bytes, to_base64, to_url_fal
|
20
|
-
|
21
|
+
from meutils.io.files_utils import to_bytes, to_base64, to_url_fal, to_url
|
21
22
|
from meutils.notice.feishu import send_message as _send_message
|
22
23
|
|
23
24
|
from fake_useragent import UserAgent
|
@@ -80,6 +81,7 @@ async def make_request_for_hunyuan(payload, token: Optional[str] = None, respons
|
|
80
81
|
return ImagesResponse(data=data, timings={"inference": time.time() - s})
|
81
82
|
|
82
83
|
|
84
|
+
@retrying(min=3, ignored_exception_types=(IgnoredRetryException,))
|
83
85
|
async def make_request_for_gitee(payload, token: Optional[str] = None, response_format: str = "url"):
|
84
86
|
s = time.time()
|
85
87
|
feishu_url = "https://xchatllm.feishu.cn/sheets/MekfsfVuohfUf1tsWV0cCvTmn3c?sheet=PDnO6X"
|
@@ -111,22 +113,23 @@ async def make_request_for_gitee(payload, token: Optional[str] = None, response_
|
|
111
113
|
|
112
114
|
|
113
115
|
async def make_request_for_baidu(payload, token: Optional[str] = None, response_format: str = "url"):
|
114
|
-
"""todo redis"""
|
115
116
|
s = time.time()
|
116
|
-
token = token or await get_next_token_for_polling(feishu_url=FEISHU_URL, from_redis=True)
|
117
|
+
# token = token or await get_next_token_for_polling(feishu_url=FEISHU_URL, from_redis=True)
|
117
118
|
headers = {
|
118
|
-
'Cookie': token,
|
119
|
+
# 'Cookie': token,
|
119
120
|
'User-Agent': ua.random,
|
120
121
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
121
122
|
}
|
122
123
|
|
123
|
-
|
124
|
+
proxy_list = await get_proxy_list()
|
125
|
+
logger.debug(proxy_list)
|
124
126
|
|
125
127
|
request_kwargs = {
|
126
|
-
"proxy":
|
128
|
+
"proxy": proxy_list[-1],
|
127
129
|
}
|
128
|
-
|
129
|
-
|
130
|
+
|
131
|
+
async with httpx.AsyncClient(base_url=BASE_URL, headers=headers, timeout=60) as client:
|
132
|
+
response = await client.post("/aigc/pccreate", data=payload, extensions=request_kwargs) # pcEditTaskid
|
130
133
|
response.raise_for_status()
|
131
134
|
data = response.json()
|
132
135
|
|
@@ -137,18 +140,22 @@ async def make_request_for_baidu(payload, token: Optional[str] = None, response_
|
|
137
140
|
for i in range(30):
|
138
141
|
await asyncio.sleep(3)
|
139
142
|
try:
|
140
|
-
response = await client.get(f'/aigc/pcquery?taskId={task_id}')
|
143
|
+
response = await client.get(f'/aigc/pcquery?taskId={task_id}') # todo: get任务未加代理
|
141
144
|
if data := response.json().get("picArr", []):
|
142
145
|
image_base64 = data[0].get("src")
|
143
146
|
break
|
144
147
|
except Exception as e:
|
145
148
|
logger.error(e)
|
146
|
-
if i > 3:
|
149
|
+
if i > 3:
|
150
|
+
raise IgnoredRetryException(f"忽略重试: \n{response.text}")
|
151
|
+
|
147
152
|
if not image_base64:
|
148
153
|
raise Exception(f"NO WATERMARK FOUND: {data}") #############
|
149
154
|
|
150
155
|
if response_format == "url":
|
151
|
-
url = await to_url_fal(image_base64, content_type="image/png")
|
156
|
+
# url = await to_url_fal(image_base64, content_type="image/png")
|
157
|
+
url = await to_url(image_base64, content_type="image/png")
|
158
|
+
|
152
159
|
return ImagesResponse(data=[{"url": url}], timings={"inference": time.time() - s})
|
153
160
|
else:
|
154
161
|
return ImagesResponse(data=[{"b64_json": image_base64}], timings={"inference": time.time() - s})
|
@@ -204,7 +211,7 @@ if __name__ == '__main__':
|
|
204
211
|
# hunyuan
|
205
212
|
token = "web_uid=ac283ec7-4bf6-40c9-a0ce-5a2e0cd7db06; hy_source=web; hy_user=I09MgMfFcUUyVSIg; hy_token=hevVCi/QuVjQcre5NDRMO7FuiWCZoDMIq3Zp8IwNxrPUofl4zWYazHEdeZ2S5o7q; _qimei_q36=; _qimei_h38=f2d27f50f0f23e085296d28303000006a17a09; _qimei_fingerprint=efbb885a22f7d4e5589008c28bc8e7ba; _qimei_uuid42=18c0310102d1002a082420cd40bb9717523c3c7e12; _gcl_au=1.1.915258067.1733278380; _ga_RPMZTEBERQ=GS1.1.1733722091.3.1.1733722108.0.0.0; _ga=GA1.2.981511920.1725261466; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%22100000458739%22%2C%22first_id%22%3A%22191b198c7b2d52-0fcca8d731cb9b8-18525637-2073600-191b198c7b31fd9%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%A4%BE%E4%BA%A4%E7%BD%91%E7%AB%99%E6%B5%81%E9%87%8F%22%2C%22%24latest_utm_medium%22%3A%22cpc%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTkxYjE5OGM3YjJkNTItMGZjY2E4ZDczMWNiOWI4LTE4NTI1NjM3LTIwNzM2MDAtMTkxYjE5OGM3YjMxZmQ5IiwiJGlkZW50aXR5X2xvZ2luX2lkIjoiMTAwMDAwNDU4NzM5In0%3D%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%24identity_login_id%22%2C%22value%22%3A%22100000458739%22%7D%2C%22%24device_id%22%3A%22191b198c7b2d52-0fcca8d731cb9b8-18525637-2073600-191b198c7b31fd9%22%7D"
|
206
213
|
|
207
|
-
url = "https://
|
214
|
+
url = "https://s3.ffire.cc/files/jimeng.jpg"
|
208
215
|
# url = "https://oss.ffire.cc/files/shuiyin.jpg"
|
209
216
|
# url = "https://oss.ffire.cc/files/shuiyin3.jpg"
|
210
217
|
|
meutils/apis/images/recraft.py
CHANGED
@@ -9,11 +9,11 @@
|
|
9
9
|
# @Description :
|
10
10
|
|
11
11
|
from meutils.pipe import *
|
12
|
-
from meutils.caches
|
13
|
-
from meutils.io.files_utils import to_url, to_url_fal
|
12
|
+
from meutils.caches import rcache
|
13
|
+
from meutils.io.files_utils import to_url, to_url_fal, to_base64
|
14
14
|
from meutils.schemas.image_types import ImageRequest, ImagesResponse, RecraftImageRequest
|
15
15
|
from meutils.notice.feishu import IMAGES, send_message as _send_message
|
16
|
-
from meutils.config_utils.lark_utils import get_next_token_for_polling
|
16
|
+
from meutils.config_utils.lark_utils import get_next_token_for_polling
|
17
17
|
from meutils.decorators.retry import retrying
|
18
18
|
|
19
19
|
BASE_URL = "https://api.recraft.ai"
|
@@ -30,7 +30,7 @@ send_message = partial(
|
|
30
30
|
)
|
31
31
|
|
32
32
|
|
33
|
-
@
|
33
|
+
@rcache(ttl=10 * 60)
|
34
34
|
@retrying()
|
35
35
|
async def get_access_token(token: str):
|
36
36
|
headers = {"cookie": token}
|
@@ -42,6 +42,32 @@ async def get_access_token(token: str):
|
|
42
42
|
return response.json()["accessToken"]
|
43
43
|
|
44
44
|
|
45
|
+
async def edit_image(image, task: Literal["vectorize", "super_resolution",] = "super_resolution"):
|
46
|
+
token = await get_next_token_for_polling(feishu_url=FEISHU_URL, check_token=check_token, from_redis=True)
|
47
|
+
token = await get_access_token(token)
|
48
|
+
headers = {"Authorization": f"Bearer {token}"}
|
49
|
+
|
50
|
+
data_url = await to_base64(image, content_type="image/png")
|
51
|
+
payload = {"image": {"data_url": data_url}}
|
52
|
+
async with httpx.AsyncClient(base_url=BASE_URL, headers=headers, timeout=60) as client:
|
53
|
+
response = await client.post(f"/project/{uuid.uuid4()}/{task}", json=payload)
|
54
|
+
response.raise_for_status()
|
55
|
+
# {
|
56
|
+
# "credits": 1,
|
57
|
+
# "image_invariants": {},
|
58
|
+
# "request_id": "72ff57fd-7638-4355-80c5-c7280e9df1a7",
|
59
|
+
# "result": {
|
60
|
+
# "image_id": "0f6f73fd-2995-422d-be74-2bbf1408103f"
|
61
|
+
# }
|
62
|
+
# }
|
63
|
+
data = response.json()
|
64
|
+
params = {"raster_image_content_type": "image/png"}
|
65
|
+
response = await client.get(f"""/image/{data["result"]["image_id"]}""", params=params)
|
66
|
+
response.raise_for_status()
|
67
|
+
url = await to_url(response.content, content_type="image/png")
|
68
|
+
return {"image": {"url": url}}
|
69
|
+
|
70
|
+
|
45
71
|
# @retrying()
|
46
72
|
async def generate(request: RecraftImageRequest, token: Optional[str] = None):
|
47
73
|
token = token or await get_next_token_for_polling(feishu_url=FEISHU_URL, check_token=check_token, from_redis=True)
|
@@ -152,12 +178,13 @@ if __name__ == '__main__':
|
|
152
178
|
# prompt='一条猫',
|
153
179
|
**data
|
154
180
|
)
|
155
|
-
|
181
|
+
token = None
|
156
182
|
# with timer():
|
157
183
|
# arun(generate(request, token=token))
|
158
|
-
|
184
|
+
with timer():
|
185
|
+
arun(edit_image("https://oss.ffire.cc/files/kling_watermark.png"))
|
159
186
|
# tokens = [token]
|
160
187
|
#
|
161
|
-
tokens = list(arun(aget_spreadsheet_values(feishu_url=FEISHU_URL, to_dataframe=True))[0]) | xfilter_
|
188
|
+
# tokens = list(arun(aget_spreadsheet_values(feishu_url=FEISHU_URL, to_dataframe=True))[0]) | xfilter_
|
162
189
|
#
|
163
|
-
r = arun(check_token(tokens))
|
190
|
+
# r = arun(check_token(tokens))
|
meutils/apis/proxy/ips.py
CHANGED
@@ -10,6 +10,7 @@
|
|
10
10
|
# https://github.com/Sndeok/HarbourJ/blob/5bbbc4b6118df779929d1521270864753731b78a/jd_inviteDraw.py#L117
|
11
11
|
|
12
12
|
from meutils.pipe import *
|
13
|
+
from meutils.caches import rcache
|
13
14
|
from meutils.decorators.retry import retrying
|
14
15
|
from meutils.hash_utils import murmurhash
|
15
16
|
from meutils.config_utils.lark_utils import get_next_token_for_polling, get_series
|
@@ -23,7 +24,7 @@ BASE_URL = "http://ip.chatfire.cn"
|
|
23
24
|
IPS = "58.240.255.226,110.42.51.201,154.37.214.121,154.40.54.76"
|
24
25
|
|
25
26
|
|
26
|
-
@
|
27
|
+
@rcache(ttl=60)
|
27
28
|
async def get_one_proxy(token: Optional[str] = None, feishu_url: str = "", from_redis: bool = True):
|
28
29
|
feishu_url = feishu_url or FEISHU_URL
|
29
30
|
if token: # 按token分配固定的ip
|
@@ -78,7 +79,7 @@ async def add_ips(ips: Optional[str] = None):
|
|
78
79
|
await asyncio.sleep(5)
|
79
80
|
|
80
81
|
|
81
|
-
@
|
82
|
+
@rcache(ttl=25)
|
82
83
|
@retrying()
|
83
84
|
async def get_proxies(request_type: str = "httpx", **kwargs):
|
84
85
|
params = {
|
@@ -100,10 +101,7 @@ async def get_proxies(request_type: str = "httpx", **kwargs):
|
|
100
101
|
resp = await client.get("/VAD/GetIp.aspx", params=params)
|
101
102
|
ip = resp.text
|
102
103
|
if request_type == "httpx":
|
103
|
-
|
104
|
-
"http://": f"http://{ip}",
|
105
|
-
"https://": f"http://{ip}",
|
106
|
-
}
|
104
|
+
return f"http://{ip}"
|
107
105
|
else:
|
108
106
|
|
109
107
|
proxies = {
|
@@ -132,7 +130,7 @@ async def check_proxy(proxy):
|
|
132
130
|
|
133
131
|
|
134
132
|
if __name__ == '__main__':
|
135
|
-
|
133
|
+
proxies = arun(get_proxies())
|
136
134
|
# url = "http://api.xiequ.cn/VAD/GetIp.aspx?act=get&uid=134597&vkey=07A1D82FDDE1E96DB5CEF4EF12C8125F&num=1&time=30&plat=1&re=1&type=0&so=1&ow=1&spl=1&addr=&db=1"
|
137
135
|
# url = f"{BASE_URL}/VAD/GetIp.aspx?act=get&uid=134597&vkey=07A1D82FDDE1E96DB5CEF4EF12C8125F&num=1&time=30&plat=1&re=1&type=0&so=1&ow=1&spl=1&addr=&db=1"
|
138
136
|
#
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/usr/bin/env Python
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
|
5
|
+
from meutils.pipe import *
|
6
|
+
from meutils.caches import rcache
|
7
|
+
from meutils.decorators.retry import retrying
|
8
|
+
|
9
|
+
url = "https://dps.kdlapi.com/api/getdps/?secret_id=owklc8tk3ypo00ohu80o&signature=8gqqy7w64g7uunseaz9tcae7h8saa24p&num=1&pt=1&format=json&sep=1"
|
10
|
+
|
11
|
+
|
12
|
+
@rcache(ttl=60 - 5)
|
13
|
+
@retrying()
|
14
|
+
async def get_proxy_list():
|
15
|
+
async with httpx.AsyncClient() as client:
|
16
|
+
response = await client.get(url)
|
17
|
+
response.raise_for_status()
|
18
|
+
proxy_list = response.json().get('data').get('proxy_list')
|
19
|
+
|
20
|
+
return [f"http://{proxy}" for proxy in proxy_list]
|
21
|
+
|
22
|
+
|
23
|
+
if __name__ == '__main__':
|
24
|
+
arun(get_proxy_list())
|
@@ -11,7 +11,7 @@
|
|
11
11
|
from openai import AsyncOpenAI
|
12
12
|
|
13
13
|
from meutils.pipe import *
|
14
|
-
from meutils.io.files_utils import to_base64
|
14
|
+
from meutils.io.files_utils import to_base64, to_url
|
15
15
|
from meutils.config_utils.lark_utils import get_next_token_for_polling
|
16
16
|
from meutils.llm.openai_utils import to_openai_images_params
|
17
17
|
from meutils.llm.check_utils import check_token_for_siliconflow
|
@@ -114,9 +114,10 @@ async def generate(request: ImageRequest, api_key: Optional[str] = None):
|
|
114
114
|
client = AsyncOpenAI(base_url=BASE_URL, api_key=api_key)
|
115
115
|
response = await client.images.generate(**data)
|
116
116
|
response.model = ""
|
117
|
-
logger.debug(response)
|
117
|
+
# logger.debug(response)
|
118
118
|
|
119
|
-
response.data[0].url = unquote(response.data[0].url or "")
|
119
|
+
# response.data[0].url = unquote(response.data[0].url or "")
|
120
|
+
response.data[0].url = await to_url(response.data[0].url, content_type="image/png")
|
120
121
|
if request.response_format == "b64_json":
|
121
122
|
b64_json = await to_base64(response.data[0].url)
|
122
123
|
|
meutils/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2025.04.
|
1
|
+
2025.04.14.18.06.48
|
meutils/io/files_utils.py
CHANGED
@@ -161,6 +161,10 @@ async def to_url(
|
|
161
161
|
|
162
162
|
|
163
163
|
async def to_base64(file: Union[UploadFile, str, bytes, list], content_type: Optional[str] = None):
|
164
|
+
if isinstance(file, list):
|
165
|
+
tasks = [to_base64(_, content_type) for _ in file]
|
166
|
+
return await asyncio.gather(*tasks)
|
167
|
+
|
164
168
|
if not file: return
|
165
169
|
|
166
170
|
_ = base64.b64encode(await to_bytes(file)).decode('utf-8')
|
@@ -33,7 +33,7 @@ class Completions(object):
|
|
33
33
|
api_key: Optional[str] = None
|
34
34
|
):
|
35
35
|
|
36
|
-
base_url = "https://
|
36
|
+
base_url = "https://api.aiguoguo199.com/v1"
|
37
37
|
|
38
38
|
self.client = AsyncOpenAI(
|
39
39
|
base_url=base_url,
|
@@ -103,22 +103,23 @@ class Completions(object):
|
|
103
103
|
if __name__ == '__main__':
|
104
104
|
url = "https://oss.ffire.cc/files/lipsync.mp3"
|
105
105
|
url = "https://lmdbk.com/5.mp4"
|
106
|
+
# url = "https://zj.lmdbk.com/tempVideos/c29b078f1fb75285a9a3362e1a39d1d2.mp4"
|
106
107
|
content = [
|
107
108
|
|
108
|
-
{"type": "text", "text": "https://oss.ffire.cc/files/nsfw.jpg 移除右下角的水印"},
|
109
|
+
# {"type": "text", "text": "https://oss.ffire.cc/files/nsfw.jpg 移除右下角的水印"},
|
109
110
|
|
110
|
-
|
111
|
+
{"type": "text", "text": "总结下"},
|
111
112
|
# {"type": "image_url", "image_url": {"url": url}},
|
112
113
|
|
113
|
-
|
114
|
+
{"type": "video_url", "video_url": {"url": url}}
|
114
115
|
|
115
116
|
]
|
116
117
|
|
117
118
|
#
|
118
119
|
request = CompletionRequest(
|
119
120
|
# model="qwen-turbo-2024-11-01",
|
120
|
-
|
121
|
-
model="gemini-2.0-flash-exp-image-generation",
|
121
|
+
model="gemini-2.0-flash",
|
122
|
+
# model="gemini-2.0-flash-exp-image-generation",
|
122
123
|
# model="qwen-plus-latest",
|
123
124
|
|
124
125
|
messages=[
|
@@ -129,7 +130,7 @@ if __name__ == '__main__':
|
|
129
130
|
},
|
130
131
|
|
131
132
|
],
|
132
|
-
stream=
|
133
|
+
stream=False,
|
133
134
|
)
|
134
135
|
|
135
136
|
api_key = "sk-Q2XxJBh3KM7bTptL6e96E8596fC74426BaA87528867aA77b"
|
@@ -56,7 +56,7 @@ async def to_file(file, api_key):
|
|
56
56
|
|
57
57
|
|
58
58
|
async def create(request: CompletionRequest, token: Optional[str] = None): # ChatCompletionRequest 重构
|
59
|
-
|
59
|
+
|
60
60
|
if request.temperature > 1:
|
61
61
|
request.temperature = 1
|
62
62
|
|
@@ -98,13 +98,13 @@ async def create(request: CompletionRequest, token: Optional[str] = None): # Ch
|
|
98
98
|
for i, content in enumerate(user_content):
|
99
99
|
if content.get("type") == 'file_url': # image_url file_url video_url
|
100
100
|
url = content.get(content.get("type")).get("url")
|
101
|
-
file_object = await to_file(url,
|
101
|
+
file_object = await to_file(url, token)
|
102
102
|
|
103
103
|
user_content[i] = {"type": "file", "file": file_object.id}
|
104
104
|
|
105
105
|
elif content.get("type") == 'image_url':
|
106
106
|
url = content.get(content.get("type")).get("url")
|
107
|
-
file_object = await to_file(url,
|
107
|
+
file_object = await to_file(url, token)
|
108
108
|
|
109
109
|
user_content[i] = {"type": "image", "image": file_object.id}
|
110
110
|
|
@@ -113,7 +113,7 @@ async def create(request: CompletionRequest, token: Optional[str] = None): # Ch
|
|
113
113
|
|
114
114
|
user_content = [{"type": "text", "text": user_content}]
|
115
115
|
|
116
|
-
file_object = await to_file(file_url,
|
116
|
+
file_object = await to_file(file_url, token)
|
117
117
|
|
118
118
|
content_type = file_object.meta.get("content_type", "")
|
119
119
|
if content_type.startswith("image"):
|
@@ -183,10 +183,10 @@ if __name__ == '__main__':
|
|
183
183
|
|
184
184
|
request = CompletionRequest(
|
185
185
|
# model="qwen-turbo-2024-11-01",
|
186
|
-
|
186
|
+
model="qwen-max-latest",
|
187
187
|
# model="qvq-max-2025-03-25",
|
188
188
|
# model="qvq-72b-preview-0310",
|
189
|
-
model="qwen2.5-omni-7b",
|
189
|
+
# model="qwen2.5-omni-7b",
|
190
190
|
|
191
191
|
# model="qwen-max-latest-search",
|
192
192
|
# model="qwq-max",
|
@@ -265,6 +265,10 @@ if __name__ == '__main__':
|
|
265
265
|
stream=True,
|
266
266
|
|
267
267
|
)
|
268
|
-
|
268
|
+
token = None
|
269
|
+
|
270
|
+
# token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwNzY1N2Y1LTgxN2ItNDg5Yi1iNjk4LWFhZjAyM2EwZTE4MyIsImV4cCI6MTc0NjI5NTAwNH0.D1uJN44NHiEt6URce4upbHvs7v73_Vd0V1s3T_JzclI"
|
271
|
+
arun(create(request, token))
|
272
|
+
# token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwNzY1N2Y1LTgxN2ItNDg5Yi1iNjk4LWFhZjAyM2EwZTE4MyIsImV4cCI6MTc0NjI5NTAwNH0.D1uJN44NHiEt6URce4upbHvs7v73_Vd0V1s3T_JzclI"
|
269
273
|
|
270
|
-
# arun(to_file("/
|
274
|
+
# arun(to_file("https://oss.ffire.cc/files/kling_watermark.png", token))
|