From db711fbf317ea67fc8adc23893099298e9cb6711 Mon Sep 17 00:00:00 2001 From: Zhang Minghan Date: Tue, 24 Oct 2023 08:38:49 +0800 Subject: [PATCH] fix --- adapter/adapter.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/adapter/adapter.go b/adapter/adapter.go index 04169cca..e641cf99 100644 --- a/adapter/adapter.go +++ b/adapter/adapter.go @@ -10,7 +10,6 @@ import ( "chat/adapter/zhipuai" "chat/globals" "chat/utils" - "github.com/spf13/viper" ) type ChatProps struct { @@ -28,15 +27,11 @@ func NewChatRequest(props *ChatProps, hook globals.Hook) error { Reversible: props.Reversible, }) return instance.CreateStreamChatRequest(&chatgpt.ChatProps{ - Model: utils.Multi( - props.Reversible && globals.IsGPT4NativeModel(props.Model), - viper.GetString("openai.reverse.hash"), - props.Model, - ), + Model: props.Model, Message: props.Message, Token: utils.Multi( props.Token == 0, - utils.Multi(globals.IsGPT4Model(props.Model) || props.Reversible || props.Infinity, -1, 2000), + utils.Multi(globals.IsGPT4Model(props.Model) || props.Infinity, -1, 2000), props.Token, ), }, hook)