Skip to content

Commit abfb6a7

Browse files
Merge pull request #41 from SmythOS/fix/llm
[ImageGenerator] throw error when api key missing for Runware
2 parents 65d9c72 + cba49d2 commit abfb6a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/core/src/Components/ImageGenerator.class.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ const imageGenerator = {
262262
const teamId = agent.teamId;
263263
const apiKey = (await getCredentials(AccessCandidate.team(teamId), 'runware')) as string;
264264

265+
if (!apiKey) {
266+
throw new Error('Runware API key is missing. Please provide a valid key to continue.');
267+
}
268+
265269
const runware = new Runware({ apiKey });
266270
await runware.ensureConnection();
267271

0 commit comments

Comments
 (0)