mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 01:30:43 +00:00
13 lines
313 B
TypeScript
13 lines
313 B
TypeScript
export function filterToolsForVisionInputs<T extends { name?: string }>(
|
|
tools: T[],
|
|
params: {
|
|
modelHasVision: boolean;
|
|
hasInboundImages: boolean;
|
|
},
|
|
): T[] {
|
|
if (!params.modelHasVision || !params.hasInboundImages) {
|
|
return tools;
|
|
}
|
|
return tools.filter((tool) => tool.name !== "image");
|
|
}
|