committed by
GitHub
parent
a1efa07b24
commit
7406db5882
@@ -25,7 +25,18 @@ func NewBrowserAgentRunner(config map[string]string, defaultURL string) *Browser
|
|||||||
config["baseURL"] = defaultURL
|
config["baseURL"] = defaultURL
|
||||||
}
|
}
|
||||||
|
|
||||||
client := api.NewClient(config["baseURL"], 15*time.Minute)
|
timeout := "15m"
|
||||||
|
if config["timeout"] != "" {
|
||||||
|
timeout = config["timeout"]
|
||||||
|
}
|
||||||
|
|
||||||
|
duration, err := time.ParseDuration(timeout)
|
||||||
|
if err != nil {
|
||||||
|
// If parsing fails, use default 15 minutes
|
||||||
|
duration = 15 * time.Minute
|
||||||
|
}
|
||||||
|
|
||||||
|
client := api.NewClient(config["baseURL"], duration)
|
||||||
|
|
||||||
return &BrowserAgentRunner{
|
return &BrowserAgentRunner{
|
||||||
client: client,
|
client: client,
|
||||||
@@ -118,5 +129,12 @@ func BrowserAgentRunnerConfigMeta() []config.Field {
|
|||||||
Type: config.FieldTypeText,
|
Type: config.FieldTypeText,
|
||||||
HelpText: "Custom name for this action",
|
HelpText: "Custom name for this action",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "timeout",
|
||||||
|
Label: "Client Timeout",
|
||||||
|
Type: config.FieldTypeText,
|
||||||
|
Required: false,
|
||||||
|
HelpText: "Client timeout duration (e.g. '15m', '1h'). Defaults to '15m' if not specified.",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,18 @@ func NewDeepResearchRunner(config map[string]string, defaultURL string) *DeepRes
|
|||||||
config["baseURL"] = defaultURL
|
config["baseURL"] = defaultURL
|
||||||
}
|
}
|
||||||
|
|
||||||
client := api.NewClient(config["baseURL"], 15*time.Minute)
|
timeout := "15m"
|
||||||
|
if config["timeout"] != "" {
|
||||||
|
timeout = config["timeout"]
|
||||||
|
}
|
||||||
|
|
||||||
|
duration, err := time.ParseDuration(timeout)
|
||||||
|
if err != nil {
|
||||||
|
// If parsing fails, use default 15 minutes
|
||||||
|
duration = 15 * time.Minute
|
||||||
|
}
|
||||||
|
|
||||||
|
client := api.NewClient(config["baseURL"], duration)
|
||||||
|
|
||||||
return &DeepResearchRunner{
|
return &DeepResearchRunner{
|
||||||
client: client,
|
client: client,
|
||||||
@@ -126,5 +137,12 @@ func DeepResearchRunnerConfigMeta() []config.Field {
|
|||||||
Type: config.FieldTypeText,
|
Type: config.FieldTypeText,
|
||||||
HelpText: "Custom name for this action",
|
HelpText: "Custom name for this action",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "timeout",
|
||||||
|
Label: "Client Timeout",
|
||||||
|
Type: config.FieldTypeText,
|
||||||
|
Required: false,
|
||||||
|
HelpText: "Client timeout duration (e.g. '15m', '1h'). Defaults to '15m' if not specified.",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user