mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-14 21:52:56 +08:00
Compare commits
4 Commits
8a6d9a58b1
...
df1a2429b1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df1a2429b1 | ||
|
|
19f60d34c9 | ||
|
|
61279f8b3d | ||
|
|
86c748534c |
5578
envs/pydantic-v1/poetry.lock
generated
5578
envs/pydantic-v1/poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,6 @@ feedparser = "^6.0.11"
|
|||||||
imagehash = "^4.3.1"
|
imagehash = "^4.3.1"
|
||||||
cn2an = "^0.5.22"
|
cn2an = "^0.5.22"
|
||||||
dateparser = "^1.2.0"
|
dateparser = "^1.2.0"
|
||||||
bilireq = ">=0.2.10"
|
|
||||||
python-jose = { extras = ["cryptography"], version = "^3.3.0" }
|
python-jose = { extras = ["cryptography"], version = "^3.3.0" }
|
||||||
python-multipart = "^0.0.9"
|
python-multipart = "^0.0.9"
|
||||||
aiocache = {extras = ["redis"], version = "^0.12.3"}
|
aiocache = {extras = ["redis"], version = "^0.12.3"}
|
||||||
@ -47,10 +46,10 @@ nonebot-plugin-uninfo = ">=0.7.3"
|
|||||||
nonebot-plugin-waiter = "^0.8.1"
|
nonebot-plugin-waiter = "^0.8.1"
|
||||||
multidict = ">=6.0.0,!=6.3.2"
|
multidict = ">=6.0.0,!=6.3.2"
|
||||||
pydantic = ">=1.0.0, <2.0.0"
|
pydantic = ">=1.0.0, <2.0.0"
|
||||||
|
|
||||||
redis = { version = ">=5", optional = true }
|
redis = { version = ">=5", optional = true }
|
||||||
asyncpg = { version = ">=0.20.0", optional = true }
|
asyncpg = { version = ">=0.20.0", optional = true }
|
||||||
alibabacloud-devops20210625 = "^5.0.2"
|
alibabacloud-devops20210625 = "^5.0.2"
|
||||||
|
json_repair = "^0.54.0"
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
nonebug = "^0.4"
|
nonebug = "^0.4"
|
||||||
|
|||||||
5688
envs/pydantic-v2/poetry.lock
generated
5688
envs/pydantic-v2/poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,6 @@ feedparser = "^6.0.11"
|
|||||||
imagehash = "^4.3.1"
|
imagehash = "^4.3.1"
|
||||||
cn2an = "^0.5.22"
|
cn2an = "^0.5.22"
|
||||||
dateparser = "^1.2.0"
|
dateparser = "^1.2.0"
|
||||||
bilireq = ">=0.2.10"
|
|
||||||
python-jose = { extras = ["cryptography"], version = "^3.3.0" }
|
python-jose = { extras = ["cryptography"], version = "^3.3.0" }
|
||||||
python-multipart = "^0.0.9"
|
python-multipart = "^0.0.9"
|
||||||
aiocache = {extras = ["redis"], version = "^0.12.3"}
|
aiocache = {extras = ["redis"], version = "^0.12.3"}
|
||||||
@ -47,10 +46,10 @@ nonebot-plugin-uninfo = ">=0.7.3"
|
|||||||
nonebot-plugin-waiter = "^0.8.1"
|
nonebot-plugin-waiter = "^0.8.1"
|
||||||
multidict = ">=6.0.0,!=6.3.2"
|
multidict = ">=6.0.0,!=6.3.2"
|
||||||
pydantic = ">=2.0.0, <3.0.0"
|
pydantic = ">=2.0.0, <3.0.0"
|
||||||
|
|
||||||
redis = { version = ">=5", optional = true }
|
redis = { version = ">=5", optional = true }
|
||||||
asyncpg = { version = ">=0.20.0", optional = true }
|
asyncpg = { version = ">=0.20.0", optional = true }
|
||||||
alibabacloud-devops20210625 = "^5.0.2"
|
alibabacloud-devops20210625 = "^5.0.2"
|
||||||
|
json_repair = "^0.54.0"
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
nonebug = "^0.4"
|
nonebug = "^0.4"
|
||||||
|
|||||||
@ -21,7 +21,6 @@ feedparser>=6.0.11,<7.0.0
|
|||||||
ImageHash>=4.3.1,<5.0.0
|
ImageHash>=4.3.1,<5.0.0
|
||||||
cn2an>=0.5.22,<0.6.0
|
cn2an>=0.5.22,<0.6.0
|
||||||
dateparser>=1.2.0,<2.0.0
|
dateparser>=1.2.0,<2.0.0
|
||||||
bilireq>=0.2.10
|
|
||||||
python-jose[cryptography]>=3.3.0,<4.0.0
|
python-jose[cryptography]>=3.3.0,<4.0.0
|
||||||
python-multipart>=0.0.9,<0.1.0
|
python-multipart>=0.0.9,<0.1.0
|
||||||
aiocache[redis]>=0.12.3,<0.13.0
|
aiocache[redis]>=0.12.3,<0.13.0
|
||||||
@ -32,6 +31,6 @@ nonebot-plugin-uninfo>=0.7.3
|
|||||||
nonebot-plugin-waiter>=0.8.1,<0.9.0
|
nonebot-plugin-waiter>=0.8.1,<0.9.0
|
||||||
multidict>=6.0.0,<7.0.0,!=6.3.2
|
multidict>=6.0.0,<7.0.0,!=6.3.2
|
||||||
alibabacloud-devops20210625>=5.0.2,<6.0.0
|
alibabacloud-devops20210625>=5.0.2,<6.0.0
|
||||||
|
json_repair>=0.54.0,<0.55.0
|
||||||
redis>=5
|
redis>=5
|
||||||
asyncpg>=0.20.0
|
asyncpg>=0.20.0
|
||||||
|
|||||||
@ -119,8 +119,7 @@ class GeminiAdapter(BaseAdapter):
|
|||||||
system_instruction_parts = [{"text": msg.content}]
|
system_instruction_parts = [{"text": msg.content}]
|
||||||
elif isinstance(msg.content, list):
|
elif isinstance(msg.content, list):
|
||||||
system_instruction_parts = [
|
system_instruction_parts = [
|
||||||
await converter.convert_part(part)
|
await converter.convert_part(part) for part in msg.content
|
||||||
for part in msg.content
|
|
||||||
]
|
]
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
@ -302,13 +302,6 @@ async def _generate_image_from_message(
|
|||||||
messages = await normalize_to_llm_messages(message)
|
messages = await normalize_to_llm_messages(message)
|
||||||
|
|
||||||
async with await get_model_instance(model) as model_instance:
|
async with await get_model_instance(model) as model_instance:
|
||||||
if not model_instance.can_generate_images:
|
|
||||||
raise LLMException(
|
|
||||||
f"模型 '{model_instance.provider_name}/{model_instance.model_name}'"
|
|
||||||
f"不支持图片生成",
|
|
||||||
code=LLMErrorCode.CONFIGURATION_ERROR,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = await model_instance.generate_response(messages, config=config)
|
response = await model_instance.generate_response(messages, config=config)
|
||||||
|
|
||||||
if not response.images:
|
if not response.images:
|
||||||
|
|||||||
@ -587,9 +587,7 @@ class AI:
|
|||||||
final_config = LLMGenerationConfig()
|
final_config = LLMGenerationConfig()
|
||||||
|
|
||||||
if max_validation_retries is None:
|
if max_validation_retries is None:
|
||||||
max_validation_retries = (
|
max_validation_retries = get_llm_config().client_settings.structured_retries
|
||||||
get_llm_config().client_settings.structured_retries
|
|
||||||
)
|
|
||||||
|
|
||||||
resolved_model_name = self._resolve_model_name(model or self.config.model)
|
resolved_model_name = self._resolve_model_name(model or self.config.model)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user