Search
Code3,818
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 { nanoid } from "https://esm.sh/nanoid@5.0.5";import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";import { Configuration, OpenAIApi } from "npm:openai";const TABLE_NAME = `memories`;async function generateFunFacts(previousFacts) { try { const apiKey = Deno.env.get("OPENAI_API_KEY"); if (!apiKey) { console.error("OpenAI API key is not configured."); return null; } const configuration = new Configuration({ apiKey }); const openai = new OpenAIApi(configuration); const previousFactsText = previousFacts`; const completion = await openai.createChatCompletion({ model: "gpt-4", // 可以选择 "gpt-3.5-turbo" messages: [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" },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" },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" },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" },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" }, * Paste this whole file into a new Val and hit save. * It renders an endlessly swirling radial vortex with shifting colours. * – ChatGPT (OpenAI o3) 2025‑04‑17 */ console.log("🎤 Sending request to Groq Whisper API"); const start = Date.now(); const response = await fetch("https://api.groq.com/openai/v1/audio/transcriptions", { method: "POST", headers: { console.log("🔵 Sending request to Groq API"); const start = Date.now(); const response = await fetch("https://api.groq.com/openai/v1/chat/completions", { method: "POST", headers: { console.log("🔊 Sending request to Groq Speech API"); const start = Date.now(); const response = await fetch("https://api.groq.com/openai/v1/audio/speech", { method: "POST", headers: {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" },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