mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-10-19 07:23:51 +00:00
Reject empty Vision Model responses
This commit is contained in:
parent
540ef8d815
commit
1d922aaab2
3 changed files with 44 additions and 0 deletions
|
|
@ -116,6 +116,8 @@ class VisionLoad(Tool):
|
|||
response, _ = await build_vision_model(self.agent).unified_call(
|
||||
messages=[HumanMessage(content=content)],
|
||||
)
|
||||
if not str(response or "").strip():
|
||||
raise RuntimeError("Vision Model returned an empty response.")
|
||||
return str(response)
|
||||
|
||||
def _store_ephemeral_image(self, image: ephemeral_images.EphemeralImage) -> str:
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
- Direct parallel workers inherit the parent's model override generically. This tool uses their recorded parent context only to resolve ephemeral refs and durable chat media.
|
||||
- `max_embeds` comes from the model that actually receives the images.
|
||||
- Vision Model calls use the selected model's Advanced `kwargs`; this tool does not impose a separate timeout or output-token limit.
|
||||
- An empty Vision Model response is reported as an image-analysis error instead of a successful empty capsule.
|
||||
- Update this file whenever tool arguments, output shape, `break_loop` behavior, intervention handling, prompt instructions, or side effects change.
|
||||
- `VisionLoad` is a `Tool`.
|
||||
- `VisionLoad` defines `execute(...)`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue