mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-14 21:52:56 +08:00
🚨 auto fix by pre-commit hooks
This commit is contained in:
parent
61279f8b3d
commit
19f60d34c9
@ -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,7 +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:
|
||||||
|
|
||||||
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