Browse Source

Don't add provider to chat

HEAD
Yang Luo 2 years ago
parent
commit
4c7c5fe04a
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      object/chat.go

+ 10
- 10
object/chat.go View File

@@ -96,16 +96,16 @@ func UpdateChat(id string, chat *Chat) (bool, error) {
}

func AddChat(chat *Chat) (bool, error) {
if chat.Type == "AI" && chat.User2 == "" {
provider, err := GetDefaultModelProvider()
if err != nil {
return false, err
}
if provider != nil {
chat.User2 = provider.Name
}
}
//if chat.Type == "AI" && chat.User2 == "" {
// provider, err := GetDefaultModelProvider()
// if err != nil {
// return false, err
// }
//
// if provider != nil {
// chat.User2 = provider.Name
// }
//}

affected, err := adapter.engine.Insert(chat)
if err != nil {


Loading…
Cancel
Save