Search
Code3,268
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" },
import { generateText } from "npm:ai";import { Effect } from "npm:effect";import { OpenAiModel } from "./model.ts";export const LlmAccessLive = Effect.succeed({ Effect.tryPromise(async () => { const response = await generateText({ model: OpenAiModel, prompt, });
import { openai } from "npm:@ai-sdk/openai";export const OpenAiModel = openai("gpt-4o");
import { drizzle } from "npm:drizzle-orm/libsql";import { emails } from "./shared/db/schema.ts";import { OpenAI } from "https://esm.town/v/std/openai?v=5";import { email } from "https://esm.town/v/std/email?v=13";const openai = new OpenAI();export default async function (e: Email) { }); const response = await openai.chat.completions.create({ model: "gpt-4o-mini", messages: [
import { Hono } from "npm:hono@4.4.12";// @ts-ignoreimport { OpenAI } from "https://esm.town/v/std/openai";const app = new Hono();app.post("/generate", async (c) => { try { const openai = new OpenAI(); const response = await openai.chat.completions.create({ model: "gpt-4o", messages: [{ role: "system", content: POET_PROMPT }],
import { Hono } from "npm:hono@4.4.12";// @ts-ignoreimport { OpenAI } from "https://esm.town/v/std/openai";const app = new Hono();app.post("/generate", async (c) => { try { const openai = new OpenAI(); const response = await openai.chat.completions.create({ model: "gpt-4o", messages: [{ role: "system", content: POET_PROMPT }],
// @ts-ignoreimport { OpenAI } from "https://esm.town/v/std/openai?v=4";import { Hono } from "npm:hono@4.4.12"; try { const openai = new OpenAI(); const completion = await openai.chat.completions.create({ model: "gpt-4o", // Using gpt-4o for better spatial reasoning and precise output messages: [
const voice = document.getElementById('voiceSelect').value; const curlCommand = \`curl -X POST "https://api.groq.com/openai/v1/audio/speech" \\\\ -H "Content-Type: application/json" \\\\ -H "Authorization: Bearer YOUR_GROQ_API_KEY" \\\\ 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