Search

3,346 results found for openai (1900ms)

Code
3,251

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 { Hono } from "npm:hono@4.4.12";
// @ts-ignore
import { 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", cont
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", con
}
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-ignore
import { 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", cont
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", con
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({
real/fun/main.tsx
3 matches
import { email as sendEmail } from "https://esm.town/v/std/email?v=9";
// @ts-ignore
import { 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-ignore
import { 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", cont
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", con
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 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" },