Chore: pw tools to be disabled as default
This commit is contained in:
2
bot.go
2
bot.go
@@ -1524,7 +1524,7 @@ func init() {
|
|||||||
if cfg.STT_ENABLED {
|
if cfg.STT_ENABLED {
|
||||||
asr = NewSTT(logger, cfg)
|
asr = NewSTT(logger, cfg)
|
||||||
}
|
}
|
||||||
if !cfg.NoPlaywright {
|
if cfg.PlaywrightEnabled {
|
||||||
if err := checkPlaywright(); err != nil {
|
if err := checkPlaywright(); err != nil {
|
||||||
// slow, need a faster check if playwright install
|
// slow, need a faster check if playwright install
|
||||||
if err := installPW(); err != nil {
|
if err := installPW(); err != nil {
|
||||||
|
|||||||
@@ -56,6 +56,6 @@ StripThinkingFromAPI = true # Strip <think> blocks from messages before sending
|
|||||||
# Valid values: xhigh, high, medium, low, minimal, none (empty or none = disabled)
|
# Valid values: xhigh, high, medium, low, minimal, none (empty or none = disabled)
|
||||||
# Models that support reasoning will include thinking content wrapped in <think> tags
|
# Models that support reasoning will include thinking content wrapped in <think> tags
|
||||||
ReasoningEffort = "medium"
|
ReasoningEffort = "medium"
|
||||||
# playwright
|
# playwright tools
|
||||||
NoPlaywright = false
|
PlaywrightEnabled = false
|
||||||
PlaywrightDebug = false
|
PlaywrightDebug = false
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ type Config struct {
|
|||||||
CharSpecificContextTag string `toml:"CharSpecificContextTag"`
|
CharSpecificContextTag string `toml:"CharSpecificContextTag"`
|
||||||
AutoTurn bool `toml:"AutoTurn"`
|
AutoTurn bool `toml:"AutoTurn"`
|
||||||
// playwright browser
|
// playwright browser
|
||||||
NoPlaywright bool `toml:"NoPlaywright"` // when we want to avoid pw tool use
|
PlaywrightEnabled bool `toml:"PlaywrightEnabled"`
|
||||||
PlaywrightDebug bool `toml:"PlaywrightDebug"` // !headless
|
PlaywrightDebug bool `toml:"PlaywrightDebug"` // !headless
|
||||||
}
|
}
|
||||||
|
|
||||||
func LoadConfig(fn string) (*Config, error) {
|
func LoadConfig(fn string) (*Config, error) {
|
||||||
|
|||||||
@@ -162,6 +162,15 @@ Those could be switched in program, but also bould be setup in config.
|
|||||||
#### ToolUse
|
#### ToolUse
|
||||||
- Enable or disable explanation of tools to llm, so it could use them.
|
- Enable or disable explanation of tools to llm, so it could use them.
|
||||||
|
|
||||||
|
#### Playwright Browser Automation
|
||||||
|
These settings enable browser automation tools available to the LLM.
|
||||||
|
|
||||||
|
- **PlaywrightEnabled** (`false`)
|
||||||
|
- Enable or disable Playwright browser automation tools for the LLM. When enabled, the LLM can use tools like `pw_browser`, `pw_close`, and `pw_status` to automate browser interactions.
|
||||||
|
|
||||||
|
- **PlaywrightDebug** (`false`)
|
||||||
|
- Enable debug mode for Playwright browser. When set to `true`, the browser runs in visible (non-headless) mode, displaying the GUI for debugging purposes. When `false`, the browser runs in headless mode by default.
|
||||||
|
|
||||||
### StripThinkingFromAPI (`true`)
|
### StripThinkingFromAPI (`true`)
|
||||||
- Strip thinking blocks from messages before sending to LLM. Keeps them in chat history for local viewing but reduces token usage in API calls.
|
- Strip thinking blocks from messages before sending to LLM. Keeps them in chat history for local viewing but reduces token usage in API calls.
|
||||||
|
|
||||||
|
|||||||
2
tools.go
2
tools.go
@@ -1505,7 +1505,7 @@ func registerWindowTools() {
|
|||||||
|
|
||||||
func registerPlaywrightTools() {
|
func registerPlaywrightTools() {
|
||||||
removePlaywrightToolsFromBaseTools()
|
removePlaywrightToolsFromBaseTools()
|
||||||
if cfg != nil && !cfg.NoPlaywright {
|
if cfg != nil && cfg.PlaywrightEnabled {
|
||||||
fnMap["pw_start"] = pwStart
|
fnMap["pw_start"] = pwStart
|
||||||
fnMap["pw_stop"] = pwStop
|
fnMap["pw_stop"] = pwStop
|
||||||
fnMap["pw_is_running"] = pwIsRunning
|
fnMap["pw_is_running"] = pwIsRunning
|
||||||
|
|||||||
Reference in New Issue
Block a user