adventurousRoseGerbilmain.tsx2 matches
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
312}
13const { text: insights } = await generateText({
14model: openai("gpt-4o-mini"),
15system: "You are a thoughtful assistant providing insights on user desires.",
16prompt: "Reflect on the following user request and provide insights: " + body.user_input,
pontificate_on_user_wantsmain.tsx2 matches
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
312}
13const { text: insights } = await generateText({
14model: openai("gpt-4o-mini"),
15system: "You are a thoughtful analyst providing insights into user desires and needs.",
16prompt: "Reflect on the following user input and provide insights into the underlying desires or needs: " + body.user_input,
typeanythingmapmain.tsx3 matches
375const { query } = await request.json();
376377const { OpenAI } = await import("https://esm.town/v/std/openai");
378const openai = new OpenAI();
379380const response = await openai.chat.completions.create({
381messages: [
382{
OpenAIProxymain.tsx3 matches
1import { OpenAI } from "https://esm.town/v/std/openai";
23const openai = new OpenAI();
4const completion = await openai.chat.completions.create({
5"messages": [
6{ "role": "user", "content": "Say hello in a creative way" },
chatGPTVoiceModeClonemain.tsx3 matches
170export default async function server(request: Request): Promise<Response> {
171const { blob } = await import("https://esm.town/v/std/blob");
172const { OpenAI } = await import("https://esm.town/v/std/openai");
173const openai = new OpenAI();
174175// Clear conversation endpoint
201const combinedMessages = [...previousContext, ...messages].slice(-20);
202
203const completion = await openai.chat.completions.create({
204messages: combinedMessages,
205model: "gpt-4o-mini",
create_a_toolmain.tsx7 matches
1import { openai } from "npm:@ai-sdk/openai";
2import ValTown from "npm:@valtown/sdk";
3import { generateObject, generateText } from "npm:ai";
70const generateImplStart = Date.now();
71const { text: implementation } = await generateText({
72model: openai("gpt-4o"),
73system: `
74# VALTOWN HTTP Cloud Function Generator Prompt
965. **AI API Integration (if applicable)**:
97- If the toolDescription indicates that creative enrichment or additional processing via AI is needed, integrate an AI API call into the function.
98- Import { openai } from "npm:@ai-sdk/openai" and { generateText } from "npm:ai".
99- Use the model "gpt-4o-mini".
100- Construct a detailed, context-appropriate prompt for the AI call and integrate its response into the function’s output.
122123---typescript
124import { openai } from "npm:@ai-sdk/openai";
125import { generateText } from "npm:ai";
126135}
136const { text: analysis } = await generateText({
137model: openai("gpt-4o-mini"),
138system: "You are a creative code analyst.",
139prompt: "Analyze the following recent changes in the code: " + body.recent_changes,
233234const { object: manifestoConfig } = await generateObject({
235model: openai("gpt-4o"),
236schema: z.object({
237manifestoConfigPureJson: z.string(),
293294const { object: updatedManifestoConfigTypescript } = await generateObject({
295model: openai("gpt-4o"),
296system: promptForUpdatedManifest,
297schema: z.object({
chuck_norris_respondermain.tsx2 matches
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
313}
14const { text: chuckResponse } = await generateText({
15model: openai("gpt-4o-mini"),
16system: "You are Chuck Norris, known for humorous and exaggerated responses.",
17prompt: `Create a funny and morbid response as if Chuck Norris were reacting to the situation: ${situation}, involving the user: ${user_name}.`,
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
ai_parody_yesterdaymain.tsx2 matches
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
313const theme = body.theme;
14const { text: parodyLyrics } = await generateText({
15model: openai("gpt-4o-mini"),
16system: "You are a creative songwriter.",
17prompt: `Create a parody of the song 'Yesterday' by The Beatles. The parody should maintain the original melody and structure but incorporate the following theme: ${theme}.`,
name_new_town_australiamain.tsx2 matches
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
32122const { text: townName } = await generateText({
23model: openai("gpt-4o-mini"),
24system: "You are an AI that generates unique town names in Australia.",
25prompt: `Generate a unique town name based on the theme: ${selectedTheme}. Consider Australian geography, culture, and history.`