MeUtils 2025.4.19.14.50.54__py3-none-any.whl → 2025.4.23.16.0.20__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.
Files changed (30) hide show
  1. {MeUtils-2025.4.19.14.50.54.dist-info → MeUtils-2025.4.23.16.0.20.dist-info}/METADATA +263 -263
  2. {MeUtils-2025.4.19.14.50.54.dist-info → MeUtils-2025.4.23.16.0.20.dist-info}/RECORD +30 -27
  3. examples/_openaisdk/dalle3.py +2 -0
  4. examples/_openaisdk/openai_google.py +57 -40
  5. examples/_openaisdk/zhipu_/346/231/272/350/203/275/344/275/223.py +12 -4
  6. examples/bserver.py +85 -63
  7. meutils/apis/baidu/bdaitpzs.py +4 -3
  8. meutils/apis/chatglm/chat.py +127 -0
  9. meutils/apis/google/chat.py +34 -10
  10. meutils/apis/google/gemini_sdk.py +25 -3
  11. meutils/apis/google/upload.py +51 -0
  12. meutils/apis/jimeng/images.py +1 -1
  13. meutils/apis/proxy/kdlapi.py +16 -8
  14. meutils/apis/search/zhipu_web_search.py +5 -2
  15. meutils/apis/textin_apis/common.py +5 -2
  16. meutils/apis/volcengine_apis/images.py +5 -4
  17. meutils/data/VERSION +1 -1
  18. meutils/db/redis_db.py +4 -2
  19. meutils/io/files_utils.py +2 -2
  20. meutils/llm/check_utils.py +21 -2
  21. meutils/llm/completions/assistants/zhipu.py +225 -0
  22. meutils/llm/completions/chat_spark.py +104 -103
  23. meutils/llm/openai_polling/chat.py +41 -9
  24. meutils/notice/feishu.py +1 -1
  25. meutils/schemas/oneapi/common.py +14 -1
  26. meutils/schemas/openai_types.py +2 -0
  27. {MeUtils-2025.4.19.14.50.54.dist-info → MeUtils-2025.4.23.16.0.20.dist-info}/LICENSE +0 -0
  28. {MeUtils-2025.4.19.14.50.54.dist-info → MeUtils-2025.4.23.16.0.20.dist-info}/WHEEL +0 -0
  29. {MeUtils-2025.4.19.14.50.54.dist-info → MeUtils-2025.4.23.16.0.20.dist-info}/entry_points.txt +0 -0
  30. {MeUtils-2025.4.19.14.50.54.dist-info → MeUtils-2025.4.23.16.0.20.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,225 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ # @Project : AI. @by PyCharm
4
+ # @File : zhipu_智能体
5
+ # @Time : 2024/12/30 17:34
6
+ # @Author : betterme
7
+ # @WeChat : meutils
8
+ # @Software : PyCharm
9
+ # @Description : https://bigmodel.cn/dev/api/intelligent-agent-model/assistantapi
10
+
11
+ from meutils.pipe import *
12
+ from meutils.llm.openai_utils import to_openai_params
13
+ from meutils.llm.clients import AsyncOpenAI, zhipuai_sdk_client
14
+ from meutils.str_utils.regular_expression import parse_url
15
+
16
+ from meutils.schemas.openai_types import chat_completion, chat_completion_chunk, CompletionRequest, CompletionUsage
17
+
18
+
19
+ class Completions(object):
20
+
21
+ def __init__(self,
22
+ base_url: Optional[str] = None,
23
+ api_key: Optional[str] = None
24
+ ):
25
+ pass
26
+
27
+ async def create(self, request: CompletionRequest):
28
+ # attachments = [{"file_id": "chatglm4/3db10f79-a952-4987-83d2-cf0cfd5d5530.pdf"}]
29
+
30
+ chunks = zhipuai_sdk_client.assistant.conversation(
31
+ assistant_id=request.model,
32
+
33
+ model="glm-4-assistant",
34
+ messages=request.messages,
35
+ stream=True,
36
+ attachments=None,
37
+ metadata=None
38
+ )
39
+
40
+ references = {}
41
+ for chunk in chunks:
42
+ # logger.debug(chunk)
43
+ delta = chunk.choices[0].delta
44
+
45
+ if hasattr(delta, "tool_calls") and delta.tool_calls:
46
+ logger.debug(delta.tool_calls)
47
+
48
+ tool_call = delta.tool_calls[0].model_dump()
49
+ tool_type = tool_call.get("type", "") # drawing_tool code_interpreter web_browser retrieval
50
+ outputs = tool_call.get(tool_type, {}).get("outputs") or []
51
+ # references += outputs
52
+
53
+ references.setdefault(tool_type, []).extend(outputs)
54
+
55
+ if not outputs:
56
+ yield f"\n\n> {delta.model_dump_json(indent=4, exclude_none=True)}\n\n"
57
+ logger.debug(references)
58
+
59
+ continue
60
+
61
+ if hasattr(delta, "content"):
62
+ if references:
63
+ for i in self.references2content(references):
64
+ yield i
65
+ references = {}
66
+ # logger.debug(delta.content)
67
+ yield delta.content
68
+
69
+ else:
70
+ logger.debug(delta)
71
+
72
+ # if references: # 搜索
73
+ # urls = [f"[^{i}]: [{ref['title']}]({ref['link']})\n" for i, ref in enumerate(references, 1)]
74
+ #
75
+ # for url in urls:
76
+ # yield url
77
+ #
78
+ # references = []
79
+ #
80
+ # delta = chat_completion_chunk.choices[0].delta.model_construct(**delta.model_dump())
81
+ # chat_completion_chunk.choices[0].delta = delta
82
+ # yield chat_completion_chunk
83
+
84
+ def references2content(self, references):
85
+ """drawing_tool code_interpreter web_browser retrieval"""
86
+ if outputs := references.get("web_browser"):
87
+ for i, ref in enumerate(outputs, 1):
88
+ # yield f"[^{i}]: [{ref['title']}]({ref['link']})\n"
89
+ yield f"[{ref['title']}]({ref['link']})\n"
90
+
91
+ elif outputs := references.get("drawing_tool"):
92
+ for i, ref in enumerate(outputs, 1):
93
+ yield f"![{i}]({ref['image']})\n"
94
+
95
+ yield "\n"
96
+
97
+ async def _create(self, request: CompletionRequest):
98
+ if request.last_user_content.startswith(("http",)):
99
+ file_url, text = request.last_user_content.split(maxsplit=1)
100
+
101
+ request.messages = [
102
+ {
103
+ 'role': 'user',
104
+ 'content': [
105
+ {
106
+ "type": "text",
107
+ "text": text
108
+ },
109
+
110
+ {
111
+ "type": "file", # 不标准
112
+ "file_url": {
113
+ "url": file_url
114
+ }
115
+ }
116
+ ]
117
+ }
118
+ ]
119
+
120
+ logger.debug(request)
121
+
122
+ data = to_openai_params(request)
123
+ return await self.client.chat.completions.create(**data)
124
+
125
+
126
+ if __name__ == '__main__':
127
+ assistant_id = "65940acff94777010aa6b796"
128
+ # assistant_id = "65d2f07bb2c10188f885bd89"
129
+ # assistant_id="65a265419d72d299a9230616",
130
+ # assistant_id="659d051a5f14eb8ce1235b96",
131
+ # assistant_id="65d2f07bb2c10188f885bd89",
132
+
133
+ # assistant_id="659e54b1b8006379b4b2abd6",
134
+ # conversation_id=None, # 多轮:从messages获取
135
+ # conversation_id="67dd1317d7c8fe4c9efe459a",
136
+ request = CompletionRequest(
137
+ model=assistant_id,
138
+ messages=[
139
+ {
140
+ "role": "user",
141
+ "content": [
142
+ {
143
+ "type": "text",
144
+ # "text": "画条狗 输出两张图片",
145
+ # "text": "南京天气如何",
146
+ # "text": "https://sfile.chatglm.cn/chatglm4/3db10f79-a952-4987-83d2-cf0cfd5d5530.pdf 总结这个文件",
147
+
148
+ "text": "https://sfile.chatglm.cn/chatglm4/3db10f79-a952-4987-83d2-cf0cfd5d5530.pdf 基于这个文件做个ppt"
149
+
150
+ # "text": "周杰伦 【最新动态、相关信息或新闻】",
151
+ # "text": "生成PPT"
152
+ }]
153
+ }
154
+ ],
155
+
156
+ # messages=[
157
+ # {
158
+ # "role": "user",
159
+ # "content": [
160
+ # {
161
+ # "type": "text",
162
+ # "text": "基于这个内容做个ppt"
163
+ # },
164
+ # {
165
+ # "type": "file",
166
+ # "file": [
167
+ # {
168
+ # "file_id": "chatglm4/3db10f79-a952-4987-83d2-cf0cfd5d5530.pdf",
169
+ # "file_url": "https://sfile.chatglm.cn/chatglm4/3db10f79-a952-4987-83d2-cf0cfd5d5530.pdf",
170
+ # "file_name": "附件.大模型在合规管理工作中的应用.pdf",
171
+ # "file_size": 2571523,
172
+ # "order": 0,
173
+ # "maxReadPercent": 0,
174
+ # "cover_images": [],
175
+ # "url": "https://sfile.chatglm.cn/chatglm4/3db10f79-a952-4987-83d2-cf0cfd5d5530.pdf"
176
+ # }
177
+ # ]
178
+ # }
179
+ # ]
180
+ # }
181
+ # ]
182
+ )
183
+
184
+ arun(Completions().create(request))
185
+ # 输入 输出
186
+ # input
187
+ # {
188
+ # "assistant_id": "65d2f07bb2c10188f885bd89",
189
+ # "conversation_id": "67d932d5e579c3ded42aa80e",
190
+ # "meta_data": {
191
+ # "if_plus_model": false,
192
+ # "is_test": false,
193
+ # "input_question_type": "xxxx",
194
+ # "channel": "",
195
+ # "draft_id": "",
196
+ # "quote_log_id": "",
197
+ # "platform": "pc"
198
+ # },
199
+ # "messages": [
200
+ # {
201
+ # "role": "user",
202
+ # "content": [
203
+ # {
204
+ # "type": "text",
205
+ # "text": "基于这个内容做个ppt"
206
+ # },
207
+ # {
208
+ # "type": "file",
209
+ # "file": [
210
+ # {
211
+ # "file_id": "chatglm4/3db10f79-a952-4987-83d2-cf0cfd5d5530.pdf",
212
+ # "file_url": "https://sfile.chatglm.cn/chatglm4/3db10f79-a952-4987-83d2-cf0cfd5d5530.pdf",
213
+ # "file_name": "附件.大模型在合规管理工作中的应用.pdf",
214
+ # "file_size": 2571523,
215
+ # "order": 0,
216
+ # "maxReadPercent": 0,
217
+ # "cover_images": [],
218
+ # "url": "https://sfile.chatglm.cn/chatglm4/3db10f79-a952-4987-83d2-cf0cfd5d5530.pdf"
219
+ # }
220
+ # ]
221
+ # }
222
+ # ]
223
+ # }
224
+ # ]
225
+ # }
@@ -111,125 +111,126 @@ if __name__ == '__main__':
111
111
  # ]
112
112
  # },
113
113
 
114
+ {
115
+ 'role': 'user',
116
+ # "content": '你好',
117
+ # "content": [
118
+ # {"type": "text", "text": "描述第一张图片"},
119
+ #
120
+ # {"type": "image_url", "image_url": "https://oss.ffire.cc/files/kling_watermark.png"},
121
+ # # {"type": "image_url", "image_url": "https://oss.ffire.cc/files/nsfw.jpg"}
122
+ #
123
+ # ],
124
+
125
+ # 'content': {
126
+ # "type": "file_url",
127
+ # "file_url": {"url": "https://mj101-1317487292.cos.ap-shanghai.myqcloud.com/ai/test.pdf", "detai": "auto"}
128
+ # },
129
+ # 'content': "https://oss.ffire.cc/files/%E6%8B%9B%E6%A0%87%E6%96%87%E4%BB%B6%E5%A4%87%E6%A1%88%E8%A1%A8%EF%BC%88%E7%AC%AC%E4%BA%8C%E6%AC%A1%EF%BC%89.pdf 这个文件讲了什么?",
130
+ # 'content': "https://translate.google.com/?sl=zh-CN&tl=en&text=%E6%8F%90%E4%BE%9B%E6%96%B9&op=tr1anslate 这个文件讲了什么?",
131
+
132
+ # "content": "https://oss.ffire.cc/files/百炼系列手机产品介绍.docx 总结下"
133
+ # "content": "https://mj101-1317487292.cos.ap-shanghai.myqcloud.com/ai/test.pdf\n\n总结下"
134
+
135
+ # "content": "https://admin.ilovechatgpt.top/file/lunIMYAIzhinengzhushouduishenghuodocx_14905733.docx 总结",
136
+ "content": "http://admin.ilovechatgpt.top/file/xinjianMicrosoftWordwendangdoc-9052714901036-bGSJLeKbqQdnIZZn.doc 111111234234",
137
+
138
+ },
139
+ #
140
+ # {'role': 'assistant', 'content': "好的"},
141
+ #
114
142
  # {
115
143
  # 'role': 'user',
116
- # # "content": '你好',
144
+ # # "content": '描述第一张图片',
117
145
  # "content": [
118
146
  # {"type": "text", "text": "描述第一张图片"},
119
147
  #
120
- # {"type": "image_url", "image_url": "https://oss.ffire.cc/files/kling_watermark.png"},
121
- # # {"type": "image_url", "image_url": "https://oss.ffire.cc/files/nsfw.jpg"}
148
+ # {"type": "image_url", "image_url": "https://oss.ffire.cc/files/nsfw.jpg"}
122
149
  #
123
150
  # ],
124
151
  #
125
- # # 'content': {
126
- # # "type": "file_url",
127
- # # "file_url": {"url": "https://mj101-1317487292.cos.ap-shanghai.myqcloud.com/ai/test.pdf", "detai": "auto"}
128
- # # },
129
- # # 'content': "https://oss.ffire.cc/files/%E6%8B%9B%E6%A0%87%E6%96%87%E4%BB%B6%E5%A4%87%E6%A1%88%E8%A1%A8%EF%BC%88%E7%AC%AC%E4%BA%8C%E6%AC%A1%EF%BC%89.pdf 这个文件讲了什么?",
130
- # # 'content': "https://translate.google.com/?sl=zh-CN&tl=en&text=%E6%8F%90%E4%BE%9B%E6%96%B9&op=tr1anslate 这个文件讲了什么?",
131
- #
132
- # # "content": "https://oss.ffire.cc/files/百炼系列手机产品介绍.docx 总结下"
133
- # # "content": "https://mj101-1317487292.cos.ap-shanghai.myqcloud.com/ai/test.pdf\n\n总结下"
134
- #
135
- # # "content": "https://admin.ilovechatgpt.top/file/lunIMYAIzhinengzhushouduishenghuodocx_14905733.docx 总结"
136
- #
137
152
  # },
153
+ # {
154
+ # 'role': 'user',
155
+ # 'content': [
156
+ # {
157
+ # "type": "text",
158
+ # "text": "总结下"
159
+ # },
138
160
  #
139
- # {'role': 'assistant', 'content': "好的"},
140
- #
161
+ # {
162
+ # "type": "image_url",
163
+ # "image_url": "xx"
164
+ # }
165
+ # ]
166
+ # },
141
167
  # {
142
168
  # 'role': 'user',
143
- # # "content": '描述第一张图片',
144
- # "content": [
145
- # {"type": "text", "text": "描述第一张图片"},
169
+ # 'content': [
170
+ # {
171
+ # "type": "text",
172
+ # "text": "总结下"
173
+ # },
146
174
  #
147
- # {"type": "image_url", "image_url": "https://oss.ffire.cc/files/nsfw.jpg"}
175
+ # {
176
+ # "type": "image_url",
177
+ # "image_url": "https://oss.ffire.cc/files/招标文件备案表(第二次).pdf"
178
+ # }
179
+ # ]
180
+ # },
181
+ # {
182
+ # 'role': 'user',
183
+ # 'content': [
184
+ # {
185
+ # "type": "text",
186
+ # "text": "总结下"
187
+ # },
148
188
  #
149
- # ],
189
+ # {
190
+ # "type": "image_url",
191
+ # "image_url": "https://oss.ffire.cc/files/招标文件备案表(第二次).pdf"
192
+ # }
193
+ # ]
194
+ # },
195
+ # {
196
+ # 'role': 'assistant',
197
+ # 'content': "你好"
198
+ # },
199
+ # {
200
+ # 'role': 'user',
201
+ # 'content': [
202
+ # {
203
+ # "type": "text",
204
+ # "text": "总结下"
205
+ # },
150
206
  #
207
+ # {
208
+ # "type": "image_url",
209
+ # "image_url": "https://oss.ffire.cc/files/招标文件备案表(第二次).pdf"
210
+ # }
211
+ # ]
212
+ # },
213
+ # {
214
+ # 'role': 'assistant',
215
+ # 'content': "1"
216
+ # },
217
+ # {
218
+ # 'role': 'user',
219
+ # 'content': [
220
+ # {
221
+ # "type": "text",
222
+ # "text": "总结1"
223
+ # }
224
+ # ]
225
+ # },
226
+ # {
227
+ # 'role': 'assistant',
228
+ # 'content': "2"
229
+ # },
230
+ # {
231
+ # 'role': 'user',
232
+ # 'content': "总结2"
151
233
  # },
152
- {
153
- 'role': 'user',
154
- 'content': [
155
- {
156
- "type": "text",
157
- "text": "总结下"
158
- },
159
-
160
- {
161
- "type": "image_url",
162
- "image_url": "xx"
163
- }
164
- ]
165
- },
166
- {
167
- 'role': 'user',
168
- 'content': [
169
- {
170
- "type": "text",
171
- "text": "总结下"
172
- },
173
-
174
- {
175
- "type": "image_url",
176
- "image_url": "https://oss.ffire.cc/files/招标文件备案表(第二次).pdf"
177
- }
178
- ]
179
- },
180
- {
181
- 'role': 'user',
182
- 'content': [
183
- {
184
- "type": "text",
185
- "text": "总结下"
186
- },
187
-
188
- {
189
- "type": "image_url",
190
- "image_url": "https://oss.ffire.cc/files/招标文件备案表(第二次).pdf"
191
- }
192
- ]
193
- },
194
- {
195
- 'role': 'assistant',
196
- 'content': "你好"
197
- },
198
- {
199
- 'role': 'user',
200
- 'content': [
201
- {
202
- "type": "text",
203
- "text": "总结下"
204
- },
205
-
206
- {
207
- "type": "image_url",
208
- "image_url": "https://oss.ffire.cc/files/招标文件备案表(第二次).pdf"
209
- }
210
- ]
211
- },
212
- {
213
- 'role': 'assistant',
214
- 'content': "1"
215
- },
216
- {
217
- 'role': 'user',
218
- 'content': [
219
- {
220
- "type": "text",
221
- "text": "总结1"
222
- }
223
- ]
224
- },
225
- {
226
- 'role': 'assistant',
227
- 'content': "2"
228
- },
229
- {
230
- 'role': 'user',
231
- 'content': "总结2"
232
- },
233
234
  # 'content': [
234
235
  # {
235
236
  # "type": "text",
@@ -38,6 +38,10 @@ class Completions(object):
38
38
  if not any(i in request.model for i in ["vl", 'vision']) and (urls := request.last_urls.get("image_url")):
39
39
  # logger.debug(request)
40
40
  if request.model.startswith(("gemini",)):
41
+
42
+ # request.reasoning_effort
43
+ # "low", "medium", "high"
44
+
41
45
  if urls[-1].startswith("http"):
42
46
  base64_list = await to_base64(urls, content_type="image/png")
43
47
  else:
@@ -77,6 +81,11 @@ class Completions(object):
77
81
  data.pop("frequency_penalty", None)
78
82
  data.pop("extra_body", None)
79
83
 
84
+ if "thinking" in request.model and request.reasoning_effort is None:
85
+ data['model'] = data['model'].removesuffix("-thinking")
86
+ data['reasoning_effort'] = None
87
+ # data['reasoning_effort'] = "low"
88
+
80
89
  return await self.client.chat.completions.create(**data)
81
90
 
82
91
 
@@ -116,22 +125,44 @@ if __name__ == '__main__':
116
125
  max_tokens=None,
117
126
  )
118
127
  # arun(Completions().create(request))
128
+ # d = {
129
+ # "model": "gemini-2.5-pro-exp-03-25",
130
+ # "messages": [
131
+ # {
132
+ # "content": [
133
+ # {
134
+ # "text": "The following is an open-ended problem from an International Math competition. Please calculate the answer according to the given requirements and the information provided. Please use LaTeX format to represent the variables and formulas used in the solution process and results. Please end your solution with \"So the final answer is \boxed{multiple answers connected with commas}(unit).\" and give the result explicitly, note that the unit of the answer should not be included in \boxed{}.\nConsider the following system of equations in which all logarithms have base 10:\n\n$$\n\begin{aligned}\n(\log x)(\log y)-3 \log 5 y-\log 8 x & =a \\n(\log y)(\log z)-4 \log 5 y-\log 16 z & =b \\n(\log z)(\log x)-4 \log 8 x-3 \log 625 z & =c\n\end{aligned}\n$$\nIf $a=-4, b=4$, and $c=-18$, solve the system of equations.",
135
+ # "type": "text"
136
+ # },
137
+ # {
138
+ # "image_url": {
139
+ # "detail": "low",
140
+ # "url": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABAAEADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//2Q=="
141
+ # },
142
+ # "type": "image_url"
143
+ # }
144
+ # ],
145
+ # "role": "user"
146
+ # }
147
+ # ],
148
+ # "stream": False,
149
+ # "top_p": 0.7,
150
+ # "temperature": 0.7,
151
+ # "n": 1
152
+ # }
153
+
119
154
  d = {
120
155
  "model": "gemini-2.5-pro-exp-03-25",
156
+ # "model": "gemini-2.5-pro-exp-03-25-thinking",
157
+
121
158
  "messages": [
122
159
  {
123
160
  "content": [
124
161
  {
125
- "text": "The following is an open-ended problem from an International Math competition. Please calculate the answer according to the given requirements and the information provided. Please use LaTeX format to represent the variables and formulas used in the solution process and results. Please end your solution with \"So the final answer is \boxed{multiple answers connected with commas}(unit).\" and give the result explicitly, note that the unit of the answer should not be included in \boxed{}.\nConsider the following system of equations in which all logarithms have base 10:\n\n$$\n\begin{aligned}\n(\log x)(\log y)-3 \log 5 y-\log 8 x & =a \\n(\log y)(\log z)-4 \log 5 y-\log 16 z & =b \\n(\log z)(\log x)-4 \log 8 x-3 \log 625 z & =c\n\end{aligned}\n$$\nIf $a=-4, b=4$, and $c=-18$, solve the system of equations.",
162
+ "text": "9个8如何加减乘除运直得到1000",
126
163
  "type": "text"
127
164
  },
128
- {
129
- "image_url": {
130
- "detail": "low",
131
- "url": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABAAEADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//2Q=="
132
- },
133
- "type": "image_url"
134
- }
165
+
135
166
  ],
136
167
  "role": "user"
137
168
  }
@@ -139,7 +170,8 @@ if __name__ == '__main__':
139
170
  "stream": False,
140
171
  "top_p": 0.7,
141
172
  "temperature": 0.7,
142
- "n": 1
173
+ "n": 1,
174
+ "reasoning_effort": None
143
175
  }
144
176
 
145
177
  # request = request.construct(**d)
meutils/notice/feishu.py CHANGED
@@ -63,7 +63,7 @@ def send_message(
63
63
  "content": str(content),
64
64
  "tag": "lark_md"
65
65
  }
66
- } for content in contents
66
+ } for content in contents if ";base64," not in str(content)
67
67
  ],
68
68
  "header": {
69
69
  "title": {
@@ -72,6 +72,10 @@ MODEL_PRICE = {
72
72
  "ppt": 0.1,
73
73
  "ppt-islide": 0.1,
74
74
 
75
+ # grok
76
+ "grok-3": 0.01,
77
+ "grok-3-image": 0.02,
78
+
75
79
  # 虚拟换衣fish
76
80
  "api-kolors-virtual-try-on": 0.1,
77
81
  "official-api-kolors-virtual-try-on": 0.8,
@@ -248,9 +252,13 @@ MODEL_PRICE = {
248
252
  "o1-mini-all": 0.2,
249
253
  "o1-preview-all": 0.6,
250
254
 
255
+ "o3": 0.6 * 0.8,
251
256
  "o3-mini": 0.05,
252
257
  "o3-mini-high": 0.1,
253
258
 
259
+ "o4-mini": 0.05 * 0.8,
260
+ "o4-mini-high": 0.15 * 0.8,
261
+
254
262
  "gpt-4-all": 0.1,
255
263
  "gpt-4o-all": 0.1,
256
264
  "gpt-4o-image": 0.05,
@@ -846,6 +854,8 @@ MODEL_RATIO = {
846
854
  # 临时
847
855
  "ep-20240515073409-dlpqp": 5,
848
856
  "microsoft/phi-4": 0.035 * 5,
857
+ "mistral-small-3.1-24b-instruct": 0.1,
858
+ "mistral-small-24b-instruct-2501": 0.1,
849
859
 
850
860
  "meta-llama/Llama-3.2-11B-Vision-Instruct": 0.1,
851
861
 
@@ -1131,7 +1141,10 @@ COMPLETION_RATIO = {
1131
1141
  "step-1.5v-mini": 5,
1132
1142
  "step-1o-vision-32k": 5,
1133
1143
 
1134
- "meta-llama/Llama-3.2-11B-Vision-Instruct": 4
1144
+ "meta-llama/Llama-3.2-11B-Vision-Instruct": 4,
1145
+
1146
+ "mistral-small-3.1-24b-instruct": 0.1,
1147
+ "mistral-small-24b-instruct-2501": 3
1135
1148
 
1136
1149
  }
1137
1150
 
@@ -116,6 +116,8 @@ class CompletionRequest(BaseModel):
116
116
  frequency_penalty: Optional[float] = None
117
117
  user: Optional[str] = None
118
118
 
119
+ reasoning_effort: Optional[Literal["low", "medium", "high"]] = None
120
+
119
121
  # 拓展字段
120
122
 
121
123
  def __init__(self, **kwargs):