Skip to content

Commit f188111

Browse files
myxamediyarclaude
andcommitted
fix(higgsfield): address review findings
- Split training image URLs on line breaks only so URLs containing commas stay intact - Limit the Soul ID skill to v1 characters, the version Generate SOUL Image accepts - Let the canvas noun name the object in Get and Delete Character sentences - Mark outputs that can be null as nullable Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent e5afd35 commit f188111

5 files changed

Lines changed: 23 additions & 24 deletions

File tree

‎apps/sim/blocks/blocks/higgsfield.ts‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@ export const HiggsfieldBlock: BlockConfig = {
5050
{ text: 'Train character', field: 'name', core: true },
5151
{ text: 'from', field: 'imageUrls' },
5252
],
53-
higgsfield_get_character: [{ text: 'Read character', field: 'characterId', core: true }],
53+
higgsfield_get_character: [{ text: 'Read', field: 'characterId', core: true }],
5454
higgsfield_list_characters: ['List Soul ID characters'],
55-
higgsfield_delete_character: [
56-
{ text: 'Delete character', field: 'characterId', core: true },
57-
],
55+
higgsfield_delete_character: [{ text: 'Delete', field: 'characterId', core: true }],
5856
},
5957
},
6058
},
@@ -470,7 +468,7 @@ export const HiggsfieldBlockMeta = {
470468
name: 'train-higgsfield-soul-id-character',
471469
description: 'Train a reusable Soul ID character and use it for consistent SOUL images.',
472470
content:
473-
'# Train a Higgsfield Soul ID Character\n\nKeep the same person or mascot consistent across generated images.\n\n## Steps\n1. Collect 1 to 100 public URLs of clear reference photos with varied angles and lighting.\n2. Create the character with the SOUL version it will be used with (v1, v2, or cinema).\n3. Check the character with Get Character until its status is completed or failed.\n4. Pass the completed character ID to Generate SOUL Image; adjust character strength if the likeness is too weak or too strong.\n5. Delete characters that are no longer needed.\n\n## Output\nThe character ID and status, plus any generated image URLs.\n\nReference: https://docs.higgsfield.ai/docs/models/soul-id/create-character',
471+
'# Train a Higgsfield Soul ID Character\n\nKeep the same person or mascot consistent across generated images.\n\n## Steps\n1. Collect 1 to 100 public URLs of clear reference photos with varied angles and lighting.\n2. Create the character with SOUL version v1, the version Generate SOUL Image accepts.\n3. Check the character with Get Character until its status is completed or failed.\n4. Pass the completed character ID to Generate SOUL Image; adjust character strength if the likeness is too weak or too strong.\n5. Delete characters that are no longer needed.\n\n## Output\nThe character ID and status, plus any generated image URLs.\n\nReference: https://docs.higgsfield.ai/docs/models/soul-id/create-character',
474472
},
475473
{
476474
name: 'manage-higgsfield-requests',

‎apps/sim/tools/generated/tool-outputs.ts‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎apps/sim/tools/higgsfield/create_character.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type { ToolConfig } from '@/tools/types'
1414

1515
const MAX_TRAINING_IMAGES = 100
1616

17-
/** Accepts a JSON array or a newline/comma-separated list of image URLs. */
17+
/** Accepts a JSON array or one image URL per line; URLs may themselves contain commas. */
1818
function parseImageUrls(value: HiggsfieldCreateCharacterParams['imageUrls']): string[] {
1919
let items: unknown = value
2020
if (typeof value === 'string') {
@@ -26,7 +26,7 @@ function parseImageUrls(value: HiggsfieldCreateCharacterParams['imageUrls']): st
2626
throw new Error('Image URLs must be a JSON array or a list of URLs')
2727
}
2828
} else {
29-
items = trimmed.split(/[\n,]/)
29+
items = trimmed.split('\n')
3030
}
3131
}
3232
if (!Array.isArray(items)) throw new Error('Image URLs must be a list of URLs')

‎apps/sim/tools/higgsfield/list_characters.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ export const higgsfieldListCharactersTool: ToolConfig<
7070
description: 'Character references on this page',
7171
items: { type: 'object', properties: HIGGSFIELD_CHARACTER_PROPERTIES },
7272
},
73-
total: { type: 'number', description: 'Total number of characters', optional: true },
74-
page: { type: 'number', description: 'Current page number', optional: true },
75-
pageSize: { type: 'number', description: 'Characters per page', optional: true },
76-
totalPages: { type: 'number', description: 'Total number of pages', optional: true },
73+
total: { type: 'number', description: 'Total number of characters', nullable: true },
74+
page: { type: 'number', description: 'Current page number', nullable: true },
75+
pageSize: { type: 'number', description: 'Characters per page', nullable: true },
76+
totalPages: { type: 'number', description: 'Total number of pages', nullable: true },
7777
},
7878
}

‎apps/sim/tools/higgsfield/types.ts‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,42 +109,43 @@ export const HIGGSFIELD_REQUEST_OUTPUTS = {
109109
type: 'string',
110110
description: 'Request status: queued, in_progress, completed, failed, nsfw, or canceled',
111111
},
112-
error: { type: 'string', description: 'Failure reason, when provided', optional: true },
112+
error: { type: 'string', description: 'Failure reason, when provided', nullable: true },
113113
imageUrls: {
114114
type: 'array',
115115
description: 'Generated image URLs (image models)',
116116
items: { type: 'string', description: 'Image URL' },
117117
},
118-
videoUrl: { type: 'string', description: 'Generated video URL (video models)', optional: true },
119-
audioUrl: { type: 'string', description: 'Generated audio URL (audio output)', optional: true },
118+
videoUrl: { type: 'string', description: 'Generated video URL (video models)', nullable: true },
119+
audioUrl: { type: 'string', description: 'Generated audio URL (audio output)', nullable: true },
120120
audioUrls: {
121121
type: 'array',
122122
description: 'Generated audio URLs (audio output)',
123123
items: { type: 'string', description: 'Audio URL' },
124124
},
125-
statusUrl: { type: 'string', description: 'URL for checking the request status', optional: true },
125+
statusUrl: { type: 'string', description: 'URL for checking the request status', nullable: true },
126126
cancelUrl: {
127127
type: 'string',
128128
description: 'URL for canceling the queued request',
129-
optional: true,
129+
nullable: true,
130130
},
131131
expiresAt: {
132132
type: 'string',
133133
description: 'When the output files are deleted and their URLs stop working',
134-
optional: true,
134+
nullable: true,
135135
},
136136
} as const satisfies Record<string, ToolOutputProperty>
137137

138138
export const HIGGSFIELD_CHARACTER_PROPERTIES = {
139139
id: { type: 'string', description: 'Character (Soul ID) reference ID' },
140-
name: { type: 'string', description: 'Character name' },
141-
modelVersion: { type: 'string', description: 'SOUL family: v1, v2, or cinema' },
140+
name: { type: 'string', description: 'Character name', nullable: true },
141+
modelVersion: { type: 'string', description: 'SOUL family: v1, v2, or cinema', nullable: true },
142142
status: {
143143
type: 'string',
144144
description: 'Training status: not_ready, queued, in_progress, completed, or failed',
145+
nullable: true,
145146
},
146-
thumbnailUrl: { type: 'string', description: 'Thumbnail image URL', optional: true },
147-
createdAt: { type: 'string', description: 'Creation timestamp', optional: true },
148-
inProgressAt: { type: 'string', description: 'Training start timestamp', optional: true },
149-
failReason: { type: 'string', description: 'Training failure reason', optional: true },
147+
thumbnailUrl: { type: 'string', description: 'Thumbnail image URL', nullable: true },
148+
createdAt: { type: 'string', description: 'Creation timestamp', nullable: true },
149+
inProgressAt: { type: 'string', description: 'Training start timestamp', nullable: true },
150+
failReason: { type: 'string', description: 'Training failure reason', nullable: true },
150151
} as const satisfies Record<string, ToolOutputProperty>

0 commit comments

Comments
 (0)