Skip to content

Commit

Permalink
Revert "Add afforder strategy cli arg"
Browse files Browse the repository at this point in the history
This reverts commit 9a1127a.
  • Loading branch information
noahshinn committed Dec 6, 2023
1 parent 9a1127a commit c9bce2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
4 changes: 0 additions & 4 deletions afforder/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package afforder

import (
"collaborativebrowser/afforder/afforderstrategy"
"collaborativebrowser/afforder/afforderstrategy/filterafforder"
"collaborativebrowser/afforder/afforderstrategy/functionafforder"
"log"
)
Expand All @@ -11,7 +10,6 @@ type AfforderStrategyID string

const (
AfforderStrategyIDFunctionAfforder AfforderStrategyID = "function_afforder"
AfforderStrategyIDFilterAfforder AfforderStrategyID = "filter_afforder"
)

const DefaultAfforderStrategyID = AfforderStrategyIDFunctionAfforder
Expand All @@ -20,8 +18,6 @@ func AfforderStrategyByID(id AfforderStrategyID) afforderstrategy.AfforderStrate
switch id {
case AfforderStrategyIDFunctionAfforder:
return functionafforder.New()
case AfforderStrategyIDFilterAfforder:
return filterafforder.New()
default:
log.Printf("invalid afforder strategy ID: %s; defaulting to %s", id, DefaultAfforderStrategyID)
return functionafforder.New()
Expand Down
14 changes: 4 additions & 10 deletions cmd/shell/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"bufio"
"collaborativebrowser/actor"
"collaborativebrowser/afforder"
"collaborativebrowser/browser"
"collaborativebrowser/runner/finiterunner"
"collaborativebrowser/trajectory"
Expand All @@ -22,7 +21,6 @@ func main() {
logPath := flag.String("log-path", "out", "the path to write the trajectory and browser display to")
initialURL := flag.String("url", "https://www.google.com", "the initial url to visit")
actorStrategy := flag.String("actor-strategy", "base_llm", "the actor strategy to use; one of [base_llm, reflexion]")
afforderStrategy := flag.String("afforder-strategy", "function_afforder", "the afforder strategy to use; one of [function_afforder, filter_afforder]")
verbose := flag.Bool("verbose", false, "whether to print verbose debug logs")
flag.Parse()

Expand All @@ -48,15 +46,11 @@ func main() {
if *actorStrategy == "" {
*actorStrategy = string(actor.DefaultActorStrategyID)
}
if *afforderStrategy == "" {
*afforderStrategy = string(afforder.DefaultAfforderStrategyID)
}
runner, err := finiterunner.NewFiniteRunnerFromInitialPage(ctx, *initialURL, apiKeys, &finiterunner.Options{
MaxNumSteps: 5,
BrowserOptions: browserOptions,
LogPath: *logPath,
ActorStrategyID: actor.ActorStrategyID(*actorStrategy),
AfforderStrategyID: afforder.AfforderStrategyID(*afforderStrategy),
MaxNumSteps: 5,
BrowserOptions: browserOptions,
LogPath: *logPath,
ActorStrategyID: actor.ActorStrategyID(*actorStrategy),
})
if err != nil {
panic(fmt.Errorf("failed to create runner: %w", err))
Expand Down

0 comments on commit c9bce2c

Please sign in to comment.