MeUtils 2025.6.13.20.54.5__py3-none-any.whl → 2025.6.18.16.30.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.6.13.20.54.5.dist-info → MeUtils-2025.6.18.16.30.56.dist-info}/METADATA +260 -260
- {MeUtils-2025.6.13.20.54.5.dist-info → MeUtils-2025.6.18.16.30.56.dist-info}/RECORD +21 -19
- examples/_openaisdk/openai_doubao.py +20 -5
- examples/_openaisdk/openai_google.py +2 -1
- examples/_openaisdk/openai_kimi.py +35 -0
- examples/_openaisdk/openai_modelscope.py +47 -28
- examples/exec_demo.py +24 -1
- examples/parse_cmd.py +73 -0
- examples/parse_cmd_re.py +49 -0
- meutils/apis/hailuoai/videos.py +17 -6
- meutils/apis/oneapi/channel.py +1 -1
- meutils/apis/volcengine_apis/videos.py +2 -2
- meutils/data/VERSION +1 -1
- meutils/llm/check_utils.py +1 -1
- meutils/schemas/image_types.py +3 -1
- meutils/schemas/oneapi/common.py +10 -4
- meutils/serving/fastapi/dependencies/auth.py +8 -3
- examples/_openaisdk/openai_kindo.py +0 -32
- {MeUtils-2025.6.13.20.54.5.dist-info → MeUtils-2025.6.18.16.30.56.dist-info}/LICENSE +0 -0
- {MeUtils-2025.6.13.20.54.5.dist-info → MeUtils-2025.6.18.16.30.56.dist-info}/WHEEL +0 -0
- {MeUtils-2025.6.13.20.54.5.dist-info → MeUtils-2025.6.18.16.30.56.dist-info}/entry_points.txt +0 -0
- {MeUtils-2025.6.13.20.54.5.dist-info → MeUtils-2025.6.18.16.30.56.dist-info}/top_level.txt +0 -0
@@ -34,9 +34,9 @@ async def get_bearer_token(
|
|
34
34
|
|
35
35
|
token = auth.credentials
|
36
36
|
if token.startswith('redis:'): # redis里按序轮询
|
37
|
-
if "feishu.cn" in token:
|
37
|
+
if "feishu.cn" in token: # redis:https://xchatllm.feishu.cn/sheets/Bmjtst2f6hfMqFttbhLcdfRJnNf?sheet=Y7HVfo
|
38
38
|
feishu_url = token.removeprefix("redis:")
|
39
|
-
token = await get_next_token(feishu_url, ttl=24 * 3600)
|
39
|
+
token = await get_next_token(feishu_url, ttl=24 * 3600)
|
40
40
|
|
41
41
|
# logger.debug(token)
|
42
42
|
|
@@ -44,10 +44,15 @@ async def get_bearer_token(
|
|
44
44
|
tokens = token.removeprefix("redis:").split(',') # todo: 初始化redis
|
45
45
|
token = np.random.choice(tokens)
|
46
46
|
|
47
|
+
elif token.startswith("http") and "feishu.cn" in token: # feishu 取所有 keys 主要针对 channel
|
48
|
+
feishu_url = token
|
49
|
+
tokens = await get_series(feishu_url)
|
50
|
+
token = '\n'.join(tokens) # 多渠道
|
51
|
+
|
47
52
|
elif ',' in token: # 内存里随机轮询
|
48
53
|
token = np.random.choice(token.split(','))
|
49
54
|
|
50
|
-
elif token in {"none", "null"}:
|
55
|
+
elif token in {"None", "none", "null"}:
|
51
56
|
token = None
|
52
57
|
|
53
58
|
return token
|
@@ -1,32 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
# @Project : AI. @by PyCharm
|
4
|
-
# @File : openai_siliconflow
|
5
|
-
# @Time : 2024/6/26 10:42
|
6
|
-
# @Author : betterme
|
7
|
-
# @WeChat : meutils
|
8
|
-
# @Software : PyCharm
|
9
|
-
# @Description :
|
10
|
-
import os
|
11
|
-
|
12
|
-
from meutils.pipe import *
|
13
|
-
from openai import OpenAI
|
14
|
-
from openai import OpenAI, APIStatusError
|
15
|
-
|
16
|
-
|
17
|
-
client = OpenAI(
|
18
|
-
# base_url="https://free.chatfire.cn/v1",
|
19
|
-
api_key="9a867a14-26d1-4950-89ae-dd989dec10b5-b137b199a507d6f5",
|
20
|
-
base_url="https://all.chatfire.cc/kindo/v1"
|
21
|
-
|
22
|
-
)
|
23
|
-
|
24
|
-
try:
|
25
|
-
client.chat.completions.create(
|
26
|
-
messages=[
|
27
|
-
{"role": "user", "content": "你是谁"}
|
28
|
-
],
|
29
|
-
model="azure/gpt-4o-mini",
|
30
|
-
)
|
31
|
-
except Exception as e:
|
32
|
-
print(e)
|
File without changes
|
File without changes
|
{MeUtils-2025.6.13.20.54.5.dist-info → MeUtils-2025.6.18.16.30.56.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|