Search

27 results found for openai (60ms)

Code
27

app.post("/", async (c) => {
// Early API key check to avoid confusing when using the tester ui
if (!Deno.env.get("OPENAI_API_KEY")) {
return c.json(
{ error: "Add OPENAI_API_KEY in Environment Variables" },
503,
);
// Test endpoint for the welcome UI
app.post("/test", async (c) => {
if (!Deno.env.get("OPENAI_API_KEY")) {
return c.json(
{ error: "Add OPENAI_API_KEY in Environment Variables" },
503,
);
// Reanalyze a lead
app.post("/lead/:id/reanalyze", async (c) => {
if (!Deno.env.get("OPENAI_API_KEY")) {
return c.json(
{ error: "Add OPENAI_API_KEY in Environment Variables" },
503,
);
import { readFile } from "https://esm.town/v/std/utils/index.ts";
import { Agent, run, RunResult, webSearchTool } from "npm:@openai/agents@0.3.0";
import { getLeadById, storeLead, updateLeadOutput } from "./db.ts";
"Bash(find:*)",
"Bash(deno check:*)",
"WebFetch(domain:platform.openai.com)",
"WebSearch"
],
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" },
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" },
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" },
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" },

Vals

No vals found

Users

No users found

Docs

No docs found
Next