fix(image): 图片生成 - 打通分辨率选择并补充回归测试
This commit is contained in:
1 parent
6a118ae93b
commit
db8a301474
9 files changed
+125
-20
No files matched your search
@@ -6,12 +6,12 @@ func TestResolveWorkbenchProviderConfigMapsWorkbenchParameters(t *testing.T) {
|
||||
service := &Service{}
|
||||
|
||||
image, err := service.resolveWorkbenchProviderConfig(WorkbenchKindImage, "image-model", "logical-image", "", map[string]any{
|
||||
"size": "1024x1024", "quality": "high", "count": 2,
|
||||
"size": "1024x1024", "quality": "high", "imageResolution": "2k", "count": 2,
|
||||
}, map[string]any{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for key, want := range map[string]any{"model": "image-model", "size": "1024x1024", "quality": "high", "count": "2"} {
|
||||
for key, want := range map[string]any{"model": "image-model", "size": "1024x1024", "quality": "high", "imageResolution": "2k", "count": "2"} {
|
||||
if image[key] != want {
|
||||
t.Errorf("image config[%q] = %#v, want %#v", key, image[key], want)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user