Skip to content

Commit

Permalink
even better image prompt, but ai model is down atm... test later
Browse files Browse the repository at this point in the history
  • Loading branch information
andrioid committed Oct 14, 2024
1 parent f06cd80 commit f161031
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/actions/hello/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function greetingPrompt(country: string) {
}

export function imagePrompt(insult: string, country: string) {
return `People of ${country} in ${country}. Inspired by "${insult}". Image should have a caricature artstyle, and look silly.`;
return `People of ${country} in ${country}. Inspired by "${insult}". Image should have a caricature artstyle, and look like it's taken from a drone'.`;
}

export async function promptAI(prompt: string): Promise<string> {
Expand All @@ -26,7 +26,10 @@ export async function promptAI(prompt: string): Promise<string> {
});

const msg = data.choices[0].message?.content;
if (!msg) throw new Error("No response from AI");
if (!msg)
throw new Error("No response from AI", {
cause: data,
});
return msg;
}

Expand Down

0 comments on commit f161031

Please sign in to comment.