MeUtils 2025.6.13.10.18.19__py3-none-any.whl → 2025.6.13.20.54.5__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.10.18.19.dist-info → MeUtils-2025.6.13.20.54.5.dist-info}/METADATA +264 -264
- {MeUtils-2025.6.13.10.18.19.dist-info → MeUtils-2025.6.13.20.54.5.dist-info}/RECORD +21 -21
- meutils/apis/chatglm/glm_video_api.py +3 -2
- meutils/apis/fal/images.py +19 -5
- meutils/apis/search/_web_search.py +1 -1
- meutils/apis/volcengine_apis/videos.py +86 -27
- meutils/config_utils/lark_utils/common.py +3 -1
- meutils/data/VERSION +1 -1
- meutils/llm/check_utils.py +18 -8
- meutils/llm/completions/chat_videos.py +2 -0
- meutils/llm/openai_utils/adapters.py +44 -2
- meutils/llm/openai_utils/common.py +5 -0
- meutils/math_utils/common.py +1 -0
- meutils/schemas/image_types.py +5 -2
- meutils/schemas/oneapi/_types.py +3 -3
- meutils/schemas/oneapi/common.py +16 -0
- meutils/str_utils/json_utils.py +23 -45
- {MeUtils-2025.6.13.10.18.19.dist-info → MeUtils-2025.6.13.20.54.5.dist-info}/LICENSE +0 -0
- {MeUtils-2025.6.13.10.18.19.dist-info → MeUtils-2025.6.13.20.54.5.dist-info}/WHEEL +0 -0
- {MeUtils-2025.6.13.10.18.19.dist-info → MeUtils-2025.6.13.20.54.5.dist-info}/entry_points.txt +0 -0
- {MeUtils-2025.6.13.10.18.19.dist-info → MeUtils-2025.6.13.20.54.5.dist-info}/top_level.txt +0 -0
meutils/str_utils/json_utils.py
CHANGED
@@ -52,7 +52,12 @@ def json_loads(s):
|
|
52
52
|
|
53
53
|
|
54
54
|
def json_path(obj, expr): # todo: 缓存
|
55
|
-
"""
|
55
|
+
"""
|
56
|
+
$..["keywords","query","search_result"]
|
57
|
+
|
58
|
+
python => $..[keywords,query,search_result]
|
59
|
+
|
60
|
+
"""
|
56
61
|
if isinstance(obj, dict):
|
57
62
|
pass
|
58
63
|
elif isinstance(obj, str):
|
@@ -76,47 +81,20 @@ if __name__ == '__main__':
|
|
76
81
|
a: int = 1
|
77
82
|
|
78
83
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
"
|
85
|
-
|
86
|
-
|
87
|
-
"
|
88
|
-
"
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
"other": "",
|
97
|
-
"balance": 0,
|
98
|
-
"balance_updated_time": 0,
|
99
|
-
"models": "imagen4,recraft-v3,recraftv3,flux-pro-1.1-ultra,flux-kontext-pro,flux-kontext-max",
|
100
|
-
"group": "default",
|
101
|
-
"used_quota": 9927600,
|
102
|
-
"upstream_user_quota": 0,
|
103
|
-
"model_mapping": "{\n \"flux-pro-1.1-ultra\": \"fal-ai/flux-pro/v1.1-ultra\",\n \"ideogram-ai/ideogram-v2-turbo\": \"fal-ai/ideogram/v2/turbo\",\n \"ideogram-ai/ideogram-v2\": \"fal-ai/ideogram/v2\",\n \"recraftv3\": \"fal-ai/recraft-v3\",\n \"recraft-v3\": \"fal-ai/recraft-v3\",\n \"imagen4\": \"fal-ai/imagen4/preview\",\n \"flux-kontext-pro\": \"fal-ai/flux-pro/kontext\",\n \"flux-kontext-max\": \"fal-ai/flux-pro/kontext/max\",\n \"imagen4,recraft-v3,recraftv3,flux-pro-1.1-ultra,flux-kontext-pro,flux-kontext-max\": \"\"\n}",
|
104
|
-
"headers": "",
|
105
|
-
"status_code_mapping": "",
|
106
|
-
"priority": 1,
|
107
|
-
"auto_ban": 1,
|
108
|
-
"empty_response_retry": 0,
|
109
|
-
"not_use_key": 0,
|
110
|
-
"remark": "",
|
111
|
-
"mj_relax_limit": 99,
|
112
|
-
"mj_fast_limit": 99,
|
113
|
-
"mj_turbo_limit": 99,
|
114
|
-
"other_info": "{\"status_reason\":\"model: flux-kontext-max, status code: 500, reason: Failed to generate image: User is locked. Reason: Exhausted balance. Top up your balance at fal.ai/dashboard/billing.\",\"status_time\":1749175757}",
|
115
|
-
"channel_ratio": 1,
|
116
|
-
"error_return_429": 0,
|
117
|
-
"tag": "fal",
|
118
|
-
"setting": "",
|
119
|
-
"param_override": "",
|
120
|
-
"is_tools": True
|
121
|
-
}
|
122
|
-
)
|
84
|
+
data = {
|
85
|
+
"id": "cgt-20250613173405-qnpqg",
|
86
|
+
"model": "doubao-seedance-1-0-pro-250528",
|
87
|
+
"status": "succeeded",
|
88
|
+
"content": {
|
89
|
+
"video_url": "https://ark-content-generation-cn-beijing.tos-cn-beijing.volces.com/doubao-seedance-1-0-pro/02174980724664200000000000000000000ffffac182c177b9d12.mp4?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTYjg3ZjNlOGM0YzQyNGE1MmI2MDFiOTM3Y2IwMTY3OTE%2F20250613%2Fcn-beijing%2Ftos%2Frequest&X-Tos-Date=20250613T093454Z&X-Tos-Expires=86400&X-Tos-Signature=bc080dc9e02282dbe10c82e04c59ac1ed4afb67cbec8aa0506357540f9d47fc4&X-Tos-SignedHeaders=host"
|
90
|
+
},
|
91
|
+
"usage": {
|
92
|
+
"completion_tokens": 245388,
|
93
|
+
"total_tokens": 245388
|
94
|
+
},
|
95
|
+
"created_at": 1749807246,
|
96
|
+
"updated_at": 1749807294
|
97
|
+
}
|
98
|
+
|
99
|
+
|
100
|
+
print(json_path(data, expr='$..[url,image_url,video_url]'))
|
File without changes
|
File without changes
|
{MeUtils-2025.6.13.10.18.19.dist-info → MeUtils-2025.6.13.20.54.5.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|