siyuan-note / siyuan

A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang.
https://b3log.org/siyuan
GNU Affero General Public License v3.0
17.9k stars 1.33k forks source link

Support for selection of GPT models `gpt-4`, `gpt-4-32k` and `gpt-3.5-turbo` #8142

Closed gnep88 closed 1 year ago

gnep88 commented 1 year ago

In what scenarios do you need this feature?

Want to use GPT4 instead of GPT 3.5 Turbo

Describe the optimal solution

req := gogpt.ChatCompletionRequest{ Model: gogpt.GPT3Dot5Turbo, MaxTokens: maxTokens, Messages: reqMsgs, }

In above code, allow Model to be chosen from below list of Models

const ( GPT432K0314 = "gpt-4-32k-0314" GPT432K = "gpt-4-32k" GPT40314 = "gpt-4-0314" GPT4 = "gpt-4" GPT3Dot5Turbo0301 = "gpt-3.5-turbo-0301" GPT3Dot5Turbo = "gpt-3.5-turbo" GPT3TextDavinci003 = "text-davinci-003" GPT3TextDavinci002 = "text-davinci-002" GPT3TextCurie001 = "text-curie-001" GPT3TextBabbage001 = "text-babbage-001" GPT3TextAda001 = "text-ada-001" GPT3TextDavinci001 = "text-davinci-001" GPT3DavinciInstructBeta = "davinci-instruct-beta" GPT3Davinci = "davinci" GPT3CurieInstructBeta = "curie-instruct-beta" GPT3Curie = "curie" GPT3Ada = "ada" GPT3Babbage = "babbage" )

Describe the candidate solution

No response

Other information

No response

88250 commented 1 year ago

For the time being, only consider supporting gpt-4, gpt-4-32k and gpt-3.5-turbo. Other models may be used by fewer people and are more expensive, so we will not join them for the time being. Thanks for the suggestion.