Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

20 wiersze
624 B

  1. package openaicompat
  2. import "github.com/QuantumNous/new-api/setting/model_setting"
  3. func ShouldChatCompletionsUseResponsesPolicy(policy model_setting.ChatCompletionsToResponsesPolicy, channelID int, channelType int, model string) bool {
  4. if !policy.IsChannelEnabled(channelID, channelType) {
  5. return false
  6. }
  7. return matchAnyRegex(policy.ModelPatterns, model)
  8. }
  9. func ShouldChatCompletionsUseResponsesGlobal(channelID int, channelType int, model string) bool {
  10. return ShouldChatCompletionsUseResponsesPolicy(
  11. model_setting.GetGlobalSettings().ChatCompletionsToResponsesPolicy,
  12. channelID,
  13. channelType,
  14. model,
  15. )
  16. }