mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 00:11:36 +00:00
refactor: tune media understanding
This commit is contained in:
@@ -77,13 +77,10 @@ export function resolveScopeDecision(params: {
|
||||
});
|
||||
}
|
||||
|
||||
function inferCapabilities(
|
||||
entry: MediaUnderstandingModelConfig,
|
||||
export function inferProviderCapabilities(
|
||||
providerId?: string,
|
||||
): MediaUnderstandingCapability[] | undefined {
|
||||
if ((entry.type ?? (entry.command ? "cli" : "provider")) === "cli") {
|
||||
return ["image", "audio", "video"];
|
||||
}
|
||||
const provider = normalizeMediaProviderId(entry.provider ?? "");
|
||||
const provider = normalizeMediaProviderId(providerId ?? "");
|
||||
if (!provider) return undefined;
|
||||
if (provider === "openai" || provider === "anthropic" || provider === "minimax") {
|
||||
return ["image"];
|
||||
@@ -97,6 +94,15 @@ function inferCapabilities(
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function inferCapabilities(
|
||||
entry: MediaUnderstandingModelConfig,
|
||||
): MediaUnderstandingCapability[] | undefined {
|
||||
if ((entry.type ?? (entry.command ? "cli" : "provider")) === "cli") {
|
||||
return undefined;
|
||||
}
|
||||
return inferProviderCapabilities(entry.provider);
|
||||
}
|
||||
|
||||
export function resolveModelEntries(params: {
|
||||
cfg: ClawdbotConfig;
|
||||
capability: MediaUnderstandingCapability;
|
||||
|
||||
Reference in New Issue
Block a user