mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-14 14:30:26 +00:00
feat: add Baidu V2 channel support and improve model handling
This commit is contained in:
13
common/utils/array.go
Normal file
13
common/utils/array.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package utils
|
||||
|
||||
func DeDuplication(slice []string) []string {
|
||||
m := make(map[string]bool)
|
||||
for _, v := range slice {
|
||||
m[v] = true
|
||||
}
|
||||
result := make([]string, 0, len(m))
|
||||
for v := range m {
|
||||
result = append(result, v)
|
||||
}
|
||||
return result
|
||||
}
|
Reference in New Issue
Block a user