Skip to content

Commit

Permalink
Switch default provider
Browse files Browse the repository at this point in the history
  • Loading branch information
aandrew-me committed Jan 6, 2024
1 parent f330a45 commit d0fba44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func showHelpMessage() {
}

boldBlue.Println("\nProviders:")
fmt.Println("The default provider is Brave Leo which uses 'llama-2-13b-chat' model.")
fmt.Println("The default provider is fakeopen which uses 'GPT-3.5-turbo' model.")
fmt.Println("Available providers to use: leo, fakeopen, openai, opengpts")

bold.Println("\nProvider: leo")
Expand Down
9 changes: 6 additions & 3 deletions providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ func GetMainText(line string, provider string) string {
return openai.GetMainText(line)
} else if provider == "opengpts" {
return opengpts.GetMainText(line)
} else if provider == "leo" {
return leo.GetMainText(line)
}

return leo.GetMainText(line)
return fakeopen.GetMainText(line)
}

func NewRequest(input string, params structs.Params, prevMessages string) (*http.Response, error) {
Expand All @@ -28,7 +30,8 @@ func NewRequest(input string, params structs.Params, prevMessages string) (*http
return openai.NewRequest(input, params, prevMessages)
} else if params.Provider == "opengpts" {
return opengpts.NewRequest(input, params, prevMessages)
} else if params.Provider == "leo" {
return leo.NewRequest(input, params)
}

return leo.NewRequest(input, params)
return fakeopen.NewRequest(input, params, prevMessages)
}

0 comments on commit d0fba44

Please sign in to comment.