Search
Code3,251
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 { Hono } from "npm:hono@4.4.12";// @ts-ignoreimport { OpenAI } from "https://esm.town/v/std/openai?v=4";// --- HIERARCHICAL DATABASE (Emptied as requested) --- const userInput = `Occupation: ${occupation.title}, Task: ${task.task}`; try { const openai = new OpenAI(); const completion = await openai.chat.completions.create({ model: "gpt-4o", messages: [{ role: "system", content: PROMPT_REFINER_SYSTEM_PROMPT }, { role: "user", content: userInput }], if (!refined_prompt) return c.json({ error: "refined_prompt is required" }, 400); try { const openai = new OpenAI(); const completion = await openai.chat.completions.create({ model: "gpt-4o", messages: [{ role: "system", content: INPUT_EXTRACTOR_SYSTEM_PROMPT }, { role: "user", content: refined_prompt }], } try { const openai = new OpenAI(); const agentCompletion = await openai.chat.completions.create({ model: "gpt-4o", messages: [ throw new Error("The agent returned no content."); } const markdownCompletion = await openai.chat.completions.create({ model: "gpt-4o", messages: [
import { Hono } from "npm:hono@4.4.12";// @ts-ignoreimport { OpenAI } from "https://esm.town/v/std/openai?v=4";// --- HIERARCHICAL DATABASE (Emptied as requested) --- try { const openai = new OpenAI(); const completion = await openai.chat.completions.create({ model: "gpt-4o", messages: [{ role: "system", content: PROMPT_REFINER_SYSTEM_PROMPT }, { role: "user", content: userInput }], try { const openai = new OpenAI(); const completion = await openai.chat.completions.create({ model: "gpt-4o", messages: [{ role: "system", content: INPUT_EXTRACTOR_SYSTEM_PROMPT }, { role: "user", content: refined_prompt }], try { const openai = new OpenAI(); const agentCompletion = await openai.chat.completions.create({ model: "gpt-4o", messages: [ } const latexCompletion = await openai.chat.completions.create({ model: "gpt-4o", messages: [
import { AgentExecutor } from 'npm:langchain/agents'import { ChatPromptTemplate } from 'npm:@langchain/core/prompts'import { OpenAI } from "https://esm.town/v/std/openai";import { WikipediaQueryRun } from 'npm:@langchain/community/tools/wikipedia_query_run'import { DynamicTool } from 'npm:@langchain/core/tools'export async function agentExample() { const llm = new OpenAI() const wikipediaTool = new WikipediaQueryRun({
import { email as sendEmail } from "https://esm.town/v/std/email?v=9";// @ts-ignoreimport { OpenAI } from "https://esm.town/v/std/openai?v=4";// --- CONSTANTS & CONFIGURATION --- return c.json({ error: "Not enough credits." }, 402); const openai = new OpenAI(); const completion = await openai.chat.completions.create({ model: "gpt-4o", messages: [{ role: "system", content: VIBE_CHECK_PROMPT }, { role: "user", content: text }],
} const json = await fetch("https://text.pollinations.ai/openai", { method: "POST", headers: { }, body: JSON.stringify({ model: "openai", messages: [ {
const question = decodeURIComponent(path.substring(1)).replaceAll("-", " ").trim(); const json = await fetch("https://text.pollinations.ai/openai", { method: "POST", headers: { }, body: JSON.stringify({ model: "openai", messages: [ {
const question = "https://ask-ai.val.run/" + encodeURIComponent(rawQuestion.replaceAll(" ", "-")); const json = await fetch("https://text.pollinations.ai/openai", { method: "POST", headers: { }, body: JSON.stringify({ model: "openai", messages: [ {
import { Hono } from "npm:hono@4.4.12";// @ts-ignoreimport { OpenAI } from "https://esm.town/v/std/openai?v=4";// --- HIERARCHICAL DATABASE (Emptied as requested) --- try { const openai = new OpenAI(); const completion = await openai.chat.completions.create({ model: "gpt-4o", messages: [{ role: "system", content: PROMPT_REFINER_SYSTEM_PROMPT }, { role: "user", content: userInput }], try { const openai = new OpenAI(); const completion = await openai.chat.completions.create({ model: "gpt-4o", messages: [{ role: "system", content: INPUT_EXTRACTOR_SYSTEM_PROMPT }, { role: "user", content: refined_prompt }], try { const openai = new OpenAI(); const agentCompletion = await openai.chat.completions.create({ model: "gpt-4o", messages: [ } const latexCompletion = await openai.chat.completions.create({ model: "gpt-4o", 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" },
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