Search

4,018 results found for openai (6281ms)

Code
3,914

Configure the following variables in your environment:
- `AGENT_API_KEY` (This is a secure token that you choose to secure the agent.tsx POST endpoint)
- `OPENAI_API_KEY` (An OpenAI API Key)
- `EXA_API_KEY` (Optional, though needed if you use the web search tool)
import { anthropic } from "npm:@ai-sdk/anthropic";
import { openai } from "npm:@ai-sdk/openai";
import { generateText, streamText } from "npm:ai";
import { getSystemPrompt } from "./prompt.tsx";
const maxSteps = 10;
ROPIC_API_KEY") ? anthropic("claude-3-7-sonnet-latest") : openai("gpt-4.1");
const options = {
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" },
import { type Context, Hono } from "https://esm.sh/hono@3.11.7";
import { blob } from "https://esm.town/v/std/blob";
import { OpenAI } from "https://esm.town/v/std/openai";
import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
import Groq from "npm:groq-sdk";
const app = new Hono();
const openai = new OpenAI();
// Get all voice notes (for admin/dashboard)
async function transcribeAudio(voiceNoteId: string, audioBuffer: ArrayBuffer) {
try {
// Convert ArrayBuffer to File for OpenAI
const audioFile = new File([audioBuffer], "audio.webm", { type: "audio/webm" });
- 🎙️ Record voice notes directly in the browser
- 🤖 AI-powered transcription using OpenAI Whisper
- 🔗 Share voice notes via unique URLs
- ⏰ Set expiration by max listens or date
- **Database**: SQLite for voice note metadata
- **Storage**: Val Town Blob storage for audio files
- **AI**: OpenAI Whisper for transcription
- **Frontend**: React with TypeScript
- **Styling**: TailwindCSS
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" },
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" },

Vals

89
View more
ufano
hello-realtime
Sample app for the OpenAI Realtime API
Public
toowired
openaiproxy
 
Public
marcaureledubois
editImageWithOpenAI
 
Public
toowired
ttsGeneration
Text-to-speech generation using OpenAI TTS API
Public
jubertioai
hello-realtime
Sample app for the OpenAI Realtime API
Public

Docs

12
View more
discordWebhookWeatherHyd - send weather updates to Discord. weather_forecast_in_the_morning - weather forecast on Telegram. weatherBot - OpenAI Weather Bot via function calling. aqi - email alerts when AQI is unhealthy near
You’ll probably want to: Register a new Slash Command. Connect your bot to APIs like OpenAI’s GPT or Dall-E. Come join us in the Val Town Discord if you get