Search
Code3,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 create a fresh table.### OpenAI```tsimport { 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 "./database.ts";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 create a fresh table.### OpenAI```tsimport { 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-ignoreimport { 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-ignoreimport { 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: [
reconsumeralization
import { OpenAI } from "https://esm.town/v/std/openai";
import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
/**
* Practical Implementation of Collective Content Intelligence
* Bridging advanced AI with collaborative content creation
*/
exp
kwhinnery_openai
lost1991
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",
No docs found