Skip to content

Commit

Permalink
ai tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
andrioid committed Nov 2, 2024
1 parent f86585f commit 4b8e698
Show file tree
Hide file tree
Showing 2 changed files with 206 additions and 199 deletions.
9 changes: 7 additions & 2 deletions src/actions/hello/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ const client = new OpenAI({
});

export function greetingPrompt(country: string) {
return `You are a travel journalist knowledgeable of all countries of the world. You're full of sarcasm and wit. Make up a very short random fact about ${country}`;
return [
`You are a travel journalist knowledgeable of all countries of the world`,
`You are creative and full of sarcasm and wit`,
`Make up a random fact about ${country}`,
].join(". ");
}

export function imagePrompt(insult: string, country: string) {
const prompt = [
`Summarize the following joke about ${country}: "${insult}"`,
"stunning shot, beautiful nature, happy people",
"stunning shot, beautiful nature, people",
"Caricature art-style",
"No text, No titles, No quotes",
];
Expand All @@ -30,6 +34,7 @@ export async function promptAI(prompt: string): Promise<string> {
content: prompt,
},
],
temperature: 1.5,
max_tokens: 150,
max_completion_tokens: 100,
});
Expand Down
Loading

0 comments on commit 4b8e698

Please sign in to comment.