Search

3,298 results found for openai (1636ms)

Code
3,203

- `main.ts` - HTTP server and API endpoints
- `index.html` - UI
- `openai.ts` - AI content generation
- `database.ts` - Blob storage to store and process the .txt files
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();
export interface BlogPost {
export async function generateBlogPost(transcript: string): Promise<BlogPost> {
const completion = await openai.chat.completions.create({
messages: [{
role: "user",
export async function generateNewsletter(transcript: string): Promise<Newsletter> {
const completion = await openai.chat.completions.create({
messages: [{
role: "user",
import { serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
import { uploadTranscript, getTranscripts, deleteTranscript, clearAllTranscripts } from "./datab
import { generateBlogPost, generateNewsletter } from "./openai.ts";
const app = new Hono();
import { slack } from "./slack.ts";
import { Hono } from "npm:hono";
import { icp } from "./openai.ts";
const app = new Hono();
import { OpenAI } from "https://esm.town/v/std/openai";
import { z } from "npm:zod@3.23.8";
import { zodResponseFormat } from "npm:openai@5.12.2/helpers/zod";
const openai = new OpenAI();
const ICPResult = z.object({
}];
const resp = await openai.chat.completions.parse({
model: "gpt-5-mini",
messages,
};
import OpenAI from "npm:openai";
const client = new OpenAI({ apiKey: Deno.env.get("OPENAI_API_KEY") });
const extractFeaturedImage = (html: string) =>
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" },
// @ts-ignore
import { OpenAI } from "https://esm.town/v/std/openai?v=4";
// --- AI BEHAVIORAL GUIDELINES & PROMPT ENGINEERING ---
if (req.method === "POST") {
try {
const openai = new OpenAI();
const { playbookName, contractText } = await req.json();
`;
const completion = await openai.chat.completions.create({
model: "gpt-4o",
messages: [
// @ts-ignore
import { OpenAI } from "https://esm.town/v/std/openai?v=4";
// --- AI BEHAVIORAL GUIDELINES & PROMPT ENGINEERING ---
if (req.method === "POST") {
try {
const openai = new OpenAI();
const { playbookName, contractText } = await req.json();
`;
const completion = await openai.chat.completions.create({
model: "gpt-4o",
messages: [