Skip to content

Commit 7dd57e9

Browse files
committed
fix(gamma): remove imageSource from generate_from_template endpoint
The from-template API only accepts imageOptions.model and imageOptions.style, not imageOptions.source (image source is inherited from the template).
1 parent 5e98510 commit 7dd57e9

File tree

3 files changed

+1
-19
lines changed

3 files changed

+1
-19
lines changed

apps/sim/blocks/blocks/gamma.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Return ONLY the dimension value string, nothing else.`,
161161
{ label: 'No Images', id: 'noImages' },
162162
],
163163
value: () => 'aiGenerated',
164-
condition: { field: 'operation', value: ['generate', 'generate_from_template'] },
164+
condition: { field: 'operation', value: 'generate' },
165165
mode: 'advanced',
166166
},
167167
{

apps/sim/tools/gamma/generate_from_template.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,6 @@ export const generateFromTemplateTool: ToolConfig<
5050
visibility: 'user-or-llm',
5151
description: 'Comma-separated folder IDs to store the generated gamma in',
5252
},
53-
imageSource: {
54-
type: 'string',
55-
required: false,
56-
visibility: 'user-or-llm',
57-
description:
58-
'Where to source images: aiGenerated, pictographic, unsplash, webAllImages, webFreeToUse, webFreeToUseCommercially, giphy, placeholder, or noImages',
59-
},
6053
imageModel: {
6154
type: 'string',
6255
required: false,
@@ -92,7 +85,6 @@ export const generateFromTemplateTool: ToolConfig<
9285
}
9386

9487
const imageOptions: Record<string, unknown> = {}
95-
if (params.imageSource) imageOptions.source = params.imageSource
9688
if (params.imageModel) imageOptions.model = params.imageModel
9789
if (params.imageStyle) imageOptions.style = params.imageStyle
9890
if (Object.keys(imageOptions).length > 0) body.imageOptions = imageOptions

apps/sim/tools/gamma/types.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,6 @@ export interface GammaGenerateFromTemplateParams extends GammaBaseParams {
4848
themeId?: string
4949
exportAs?: 'pdf' | 'pptx'
5050
folderIds?: string
51-
imageSource?:
52-
| 'aiGenerated'
53-
| 'pictographic'
54-
| 'unsplash'
55-
| 'webAllImages'
56-
| 'webFreeToUse'
57-
| 'webFreeToUseCommercially'
58-
| 'giphy'
59-
| 'placeholder'
60-
| 'noImages'
6151
imageModel?: string
6252
imageStyle?: string
6353
}

0 commit comments

Comments
 (0)