Feat: rp mode
This commit is contained in:
@@ -7,10 +7,13 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
CurrentAPI string `toml:"CurrentAPI"`
|
||||
APIToken string `toml:"APIToken"`
|
||||
QuestionsPath string `toml:"QuestionsPath"`
|
||||
OutPath string `toml:"OutPath"`
|
||||
RemoteAPI string `toml:"RemoteAPI"`
|
||||
LocalAPI string `toml:"LocalAPI"`
|
||||
APIToken string `toml:"APIToken"`
|
||||
QuestionsPath string `toml:"QuestionsPath"`
|
||||
RPScenariosDir string `toml:"RPScenariosDir"`
|
||||
OutDir string `toml:"OutDir"`
|
||||
MaxTurns int `toml:"MaxTurns"`
|
||||
}
|
||||
|
||||
func LoadConfigOrDefault(fn string) *Config {
|
||||
@@ -21,9 +24,12 @@ func LoadConfigOrDefault(fn string) *Config {
|
||||
_, err := toml.DecodeFile(fn, &config)
|
||||
if err != nil {
|
||||
fmt.Println("failed to read config from file, loading default", "error", err)
|
||||
config.CurrentAPI = "http://localhost:8080/completion"
|
||||
config.RemoteAPI = "https://openrouter.ai/api/v1/completions"
|
||||
config.LocalAPI = "http://localhost:8080/completion"
|
||||
config.QuestionsPath = "data/questions.json"
|
||||
config.OutPath = "data/out.json"
|
||||
config.RPScenariosDir = "scenarios"
|
||||
config.OutDir = "results"
|
||||
config.MaxTurns = 10
|
||||
}
|
||||
return config
|
||||
}
|
||||
|
Reference in New Issue
Block a user