(value interface{})
| 69 | } |
| 70 | |
| 71 | func convertInt(value interface{}) int { |
| 72 | switch v := value.(type) { |
| 73 | case int: |
| 74 | return v |
| 75 | case float64: |
| 76 | return int(v) |
| 77 | default: |
| 78 | return 0 |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | func genAIKey(key string, provider string) string { |
| 83 | keys := strings.Split(key, "@") |