OpenRouterProvider OpenRouter 图片生成服务提供者 OpenRouter 提供统一的 API 接口,支持多种图片生成模型(如 Gemini、Flux 等)
| 18 | // OpenRouterProvider OpenRouter 图片生成服务提供者 |
| 19 | // OpenRouter 提供统一的 API 接口,支持多种图片生成模型(如 Gemini、Flux 等) |
| 20 | type OpenRouterProvider struct { |
| 21 | apiKey string |
| 22 | baseURL string |
| 23 | model string |
| 24 | aspectRatio string // OpenRouter 使用 aspect_ratio 而非 WIDTHxHEIGHT |
| 25 | imageSize string // 1K/2K/4K |
| 26 | client *http.Client |
| 27 | } |
| 28 | |
| 29 | // NewOpenRouterProvider 创建 OpenRouter Provider |
| 30 | func NewOpenRouterProvider(cfg *config.Config) (*OpenRouterProvider, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected