Search

3,300 results found for openai (1971ms)

Code
3,205

import { openai } from "npm:@ai-sdk/openai";
import { generateText } from "npm:ai";
const interactionsText = body.interactions.join("\n");
const { text: personalityProfile } = await generateText({
model: openai("gpt-4o-mini"),
system: "You are a personality analyst.",
prompt: "Based on the following user interactions, identify patterns and summarize the use
import { openai } from "npm:@ai-sdk/openai";
import { generateText } from "npm:ai";
const { text: codeAnalysis } = await generateText({
model: openai("gpt-4o-mini"),
system: "You are a code quality and complexity analyst.",
prompt: `Analyze the following codebase for quality, complexity, and structure: ${codebase
const { text: skillAssessment } = await generateText({
model: openai("gpt-4o-mini"),
system: "You are an expert in assessing programming skills.",
prompt: `Based on the following questions and answers, estimate the user's skill level and
import { openai } from "npm:@ai-sdk/openai";
import { generateText } from "npm:ai";
}
const { text: haiku } = await generateText({
model: openai("gpt-4o-mini"),
system: "You are a poet creating haikus.",
prompt: `Create a haiku about the following topic: ${body.topic}. The haiku should follow
import { openai } from "npm:@ai-sdk/openai";
import { generateText } from "npm:ai";
}
const { text: analysis } = await generateText({
model: openai("gpt-4o-mini"),
system: "You are an expert in identifying logical fallacies.",
prompt: "Analyze the following text for common logical fallacies such as ad hominem, straw
import { openai } from "npm:@ai-sdk/openai";
import { generateText } from "npm:ai";
}
const { text: dietSuggestion } = await generateText({
model: openai("gpt-4o-mini"),
system: "You are an expert zoologist.",
prompt:
import { openai } from "npm:@ai-sdk/openai";
import ValTown from "npm:@valtown/sdk";
import { generateObject, generateText } from "npm:ai";
const generateImplStart = Date.now();
const { text: implementation } = await generateText({
model: openai("gpt-4o"),
system: `
# VALTOWN HTTP Cloud Function Generator Prompt
5. **AI API Integration (if applicable)**:
- If the toolDescription indicates that creative enrichment or additional processing via AI i
- Import { openai } from "npm:@ai-sdk/openai" and { generateText } from "npm:ai".
- Use the model "gpt-4o-mini".
- Construct a detailed, context-appropriate prompt for the AI call and integrate its response
---typescript
import { openai } from "npm:@ai-sdk/openai";
import { generateText } from "npm:ai";
}
const { text: analysis } = await generateText({
model: openai("gpt-4o-mini"),
system: "You are a creative code analyst.",
prompt: "Analyze the following recent changes in the code: " + body.recent_changes,
const { object: manifestoConfig } = await generateObject({
model: openai("gpt-4o"),
schema: z.object({
manifestoConfigPureJson: z.string(),
const { object: updatedManifestoConfigTypescript } = await generateObject({
model: openai("gpt-4o"),
system: promptForUpdatedManifest,
schema: z.object({
import { openai } from "npm:@ai-sdk/openai";
import ValTown from "npm:@valtown/sdk";
import { generateObject, generateText } from "npm:ai";
const generateImplStart = Date.now();
const { text: implementation } = await generateText({
model: openai("gpt-4o"),
system: `
# VALTOWN HTTP Cloud Function Generator Prompt
5. **AI API Integration (if applicable)**:
- If the toolDescription indicates that creative enrichment or additional processing via AI i
- Import { openai } from "npm:@ai-sdk/openai" and { generateText } from "npm:ai".
- Use the model "gpt-4o-mini".
- Construct a detailed, context-appropriate prompt for the AI call and integrate its response
---typescript
import { openai } from "npm:@ai-sdk/openai";
import { generateText } from "npm:ai";
}
const { text: analysis } = await generateText({
model: openai("gpt-4o-mini"),
system: "You are a creative code analyst.",
prompt: "Analyze the following recent changes in the code: " + body.recent_changes,
const { object: manifestoConfig } = await generateObject({
model: openai("gpt-4o"),
schema: z.object({
manifestoConfigPureJson: z.string(),
const { object: updatedManifestoConfigTypescript } = await generateObject({
model: openai("gpt-4o"),
system: promptForUpdatedManifest,
schema: z.object({
"description": "A sample blah manifest demonstrating various tool types and configurations."
"env": {
"OPENAI_API_KEY": "your-openai-api-key-here",
},
"tools": [
import { openai } from "npm:@ai-sdk/openai";
import { generateText } from "npm:ai";
}
const { text: fact } = await generateText({
model: openai("gpt-4o-mini"),
system: "You are an expert in world trivia.",
prompt: `Provide an interesting and fun fact about the country: ${body.country}.`,
import { openai } from "npm:@ai-sdk/openai";
import { generateText } from "npm:ai";
const countriesList = body.countries.join(", ");
const { text: recipes } = await generateText({
model: openai("gpt-4o-mini"),
system: "You are a culinary expert.",
prompt: `Provide a list of popular recipes from the following countries: ${countriesList}.