Search

3,304 results found for openai (1598ms)

Code
3,209

Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
name: 'Open in ChatGPT',
icon: '🔮',
url: `https://chat.openai.com/?q=${encodeURIComponent(promptText)}`,
},
{
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
export const settings = {
model: "openai/gpt-oss-120b",
stream: false,
reasoningEffort: "low",
// @ts-ignore
import { OpenAI } from "https://esm.town/v/std/openai?v=4";
// @ts-ignore
import { Hono } from "npm:hono@4.4.12";
debugLog("Final AI Payload:", userInput);
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "system", content: PORTFOLIO_ANALYST_PROMPT }, {
];
const openai = new OpenAI();
const response = await openai.chat.completions.create({
model: "gpt-4o",
messages: messages,
- `main.tsx` - Main cron function and Discord webhook
- `fetch-vals.ts` - Fetches and filters new vals using Val Town SDK
- `ai-summarizer.ts` - Generates OpenAI summaries for vals without READMEs
## Additional logic
- Filter out commonly remixed utility vals like Blob Admin, SQLiteExplorer
- Skip shallow remixes (forks with ≤3 versions)
`main.tsx` files for AI summaries and limit code sent to OpenAI to 5KB to avoid token limits
## Setup
1. Set `DISCORD_WEBHOOK` environment variable
2. Set `OPENAI_API_KEY` environment variable
3. Set `testMode = false` in main.tsx for production