Removed settings.toolChoice

This commit is contained in:
Sirshendu Ganguly
2026-05-08 19:05:57 +05:30
parent 4ed18c2fa0
commit a5ed0c4267
3 changed files with 8 additions and 21 deletions
-3
View File
@@ -1354,8 +1354,6 @@ function textInferenceSettingsToggleHandler(settingsNode) {
const frequencyPenaltyWidget = settingsNode.widgets.find(w => w && w.name === "frequencyPenalty");
const useToolsWidget = settingsNode.widgets.find(w => w && w.name === "useTools");
const toolsWidget = settingsNode.widgets.find(w => w && w.name === "tools");
const useToolChoiceWidget = settingsNode.widgets.find(w => w && w.name === "useToolChoice");
const toolChoiceWidget = settingsNode.widgets.find(w => w && w.name === "toolChoice");
function toggleWidgetState(useWidget, paramWidget) {
if (!useWidget || !paramWidget) return;
@@ -1382,7 +1380,6 @@ function textInferenceSettingsToggleHandler(settingsNode) {
if (usePresencePenaltyWidget && presencePenaltyWidget) toggleWidgetState(usePresencePenaltyWidget, presencePenaltyWidget);
if (useFrequencyPenaltyWidget && frequencyPenaltyWidget) toggleWidgetState(useFrequencyPenaltyWidget, frequencyPenaltyWidget);
if (useToolsWidget && toolsWidget) toggleWidgetState(useToolsWidget, toolsWidget);
if (useToolChoiceWidget && toolChoiceWidget) toggleWidgetState(useToolChoiceWidget, toolChoiceWidget);
}
function videoSettingsToggleHandler(settingsNode) {
+6 -2
View File
@@ -38,11 +38,15 @@ class RunwareTextInferenceInputs:
if isinstance(images_block, dict) and images_block.get("images"):
imgs = images_block["images"]
if isinstance(imgs, list) and len(imgs) > 0:
out["images"] = [str(x).strip() for x in imgs if x is not None and str(x).strip()]
filtered_imgs = [str(x).strip() for x in imgs if x is not None and str(x).strip()]
if filtered_imgs:
out["images"] = filtered_imgs
if isinstance(videos_block, dict) and videos_block.get("videos"):
vids = videos_block["videos"]
if isinstance(vids, list) and len(vids) > 0:
out["videos"] = [str(x).strip() for x in vids if x is not None and str(x).strip()]
filtered_vids = [str(x).strip() for x in vids if x is not None and str(x).strip()]
if filtered_vids:
out["videos"] = filtered_vids
return (out,)
+2 -16
View File
@@ -118,15 +118,6 @@ class RunwareTextInferenceSettings:
"default": "[]",
"tooltip": "JSON array for tools.",
}),
"useToolChoice": ("BOOLEAN", {
"default": False,
"tooltip": "Include toolChoice in settings.",
}),
"toolChoice": ("STRING", {
"multiline": True,
"default": "{}",
"tooltip": "JSON object for toolChoice.",
}),
"cache": ("RUNWARETEXTINFERENCESETTINGSCACHE", {
"tooltip": "Connect Runware Text Inference Settings Cache for settings.cache.{scope, ttl}.",
}),
@@ -139,8 +130,8 @@ class RunwareTextInferenceSettings:
CATEGORY = "Runware/Text"
DESCRIPTION = (
"Optional text inference settings (systemPrompt, maxTokens, temperature, topP, topK, "
"stopSequences, presencePenalty, frequencyPenalty, tools, toolChoice, thinkingLevel, cache). "
"Connect to Runware Text Inference."
"stopSequences, presencePenalty, frequencyPenalty, tools, thinkingLevel, cache). "
"Connect to Runware Text Inference. For tool calling, use Runware Text Inference Tool Choice on the inference node."
)
@staticmethod
@@ -240,11 +231,6 @@ class RunwareTextInferenceSettings:
if parsed_tools:
out["tools"] = parsed_tools
if kwargs.get("useToolChoice", False):
parsed_choice = self._parse_json_setting(kwargs.get("toolChoice"), dict, "toolChoice")
if parsed_choice:
out["toolChoice"] = parsed_choice
tl = self._normalize_thinking_level(kwargs.get("thinkingLevel", "none"))
if tl != "none":
out["thinkingLevel"] = tl