瀏覽代碼

support gpts

CaIon 2 年之前
父節點
當前提交
44465a398b
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      model/cache.go

+ 4 - 0
model/cache.go

@@ -190,6 +190,10 @@ func SyncChannelCache(frequency int) {
 }
 
 func CacheGetRandomSatisfiedChannel(group string, model string) (*Channel, error) {
+	if strings.HasPrefix(model, "gpt-4-gizmo") {
+		model = "gpt-4-gizmo-*"
+	}
+
 	if !common.MemoryCacheEnabled {
 		return GetRandomSatisfiedChannel(group, model)
 	}