mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-18 21:02:00 +01:00
Fix openai regression (#1758)
this impacts custom openai providers, not wave proxy
This commit is contained in:
parent
1cd1744317
commit
f35375ee1a
@ -29,7 +29,7 @@ func defaultAzureMapperFn(model string) string {
|
||||
|
||||
func setApiType(opts *wshrpc.WaveAIOptsType, clientConfig *openaiapi.ClientConfig) error {
|
||||
ourApiType := strings.ToLower(opts.APIType)
|
||||
if ourApiType == "" || ourApiType == strings.ToLower(string(openaiapi.APITypeOpenAI)) {
|
||||
if ourApiType == "" || ourApiType == APIType_OpenAI || ourApiType == strings.ToLower(string(openaiapi.APITypeOpenAI)) {
|
||||
clientConfig.APIType = openaiapi.APITypeOpenAI
|
||||
return nil
|
||||
} else if ourApiType == strings.ToLower(string(openaiapi.APITypeAzure)) {
|
||||
|
@ -75,7 +75,6 @@ func RunAICommand(ctx context.Context, request wshrpc.WaveAIStreamRequest) chan
|
||||
request.Opts.Model = "default"
|
||||
backend = WaveAICloudBackend{}
|
||||
} else {
|
||||
request.Opts.APIType = APIType_OpenAI
|
||||
backend = OpenAIBackend{}
|
||||
}
|
||||
if backend == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user