isImageGenerationModel 检查是否为图像生成模型
(modelName string)
| 423 | |
| 424 | // isImageGenerationModel 检查是否为图像生成模型 |
| 425 | func isImageGenerationModel(modelName string) bool { |
| 426 | if modelName == "" { |
| 427 | return false |
| 428 | } |
| 429 | |
| 430 | // 使用 gemini adaptor 的判断函数 |
| 431 | return gemini.IsImageGenerationModel(modelName) |
| 432 | } |
| 433 | |
| 434 | // testImageGenerationChannel 测试图像生成渠道 |
| 435 | func testImageGenerationChannel(ctx context.Context, channel *model.Channel, modelName string) (responseMessage string, err error) { |