From d0fba44e3ad26d8acb4f5e019876e3eb1f0b5e3e Mon Sep 17 00:00:00 2001 From: Andrew <66430340+aandrew-me@users.noreply.github.com> Date: Sat, 6 Jan 2024 19:04:34 +0300 Subject: [PATCH] Switch default provider --- main.go | 2 +- providers/providers.go | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 5a2c731..7f668ad 100644 --- a/main.go +++ b/main.go @@ -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") diff --git a/providers/providers.go b/providers/providers.go index 7005e8c..25baf9f 100644 --- a/providers/providers.go +++ b/providers/providers.go @@ -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) { @@ -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) }