Search

3,261 results found for openai (1237ms)

Code
3,166

// @ts-ignore
import { OpenAI } from "https://esm.town/v/std/openai?v=4";
// @ts-ignore
import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
const app = new Hono();
const openai = new OpenAI();
// Helper to get all boundaries from the database
}
const completion = await openai.chat.completions.create({
model: "gpt-4o",
messages: [
// 2a. Generate Counselor Response
const counselorCompletion = await openai.chat.completions.create({
model: "gpt-4o",
messages: [
// 2b. Check with Boundary Guardian
const guardCompletion = 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" },
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" },
import { OpenAI } from "https://esm.town/v/std/openai";
import { email } from "https://esm.town/v/std/email";
deploymentRequest: string;
}): Promise<string> {
const openai = new OpenAI();
const prompt =
The poem should be 12-16 lines, use elevated but accessible language, and blend DevOps terminolo
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: prompt },
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" },
}
// Test OpenAI directly
const { OpenAI } = await import("https://esm.town/v/std/openai");
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{
input: message,
response: response,
provider: 'openai',
model: 'gpt-4o-mini',
tokensUsed: completion.usage?.total_tokens || 0
// Use AI engine directly
const { OpenAI } = await import("https://esm.town/v/std/openai");
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "system", content: `You are ${persona.name}, a ${persona.role} in a software t
// Check required environment variables
const requiredVars = [
'OPENAI_API_KEY',
'SLACK_BOT_TOKEN',
'TELNYX_API_KEY',
key: 'ai.default_provider',
value: JSON.stringify({
name: 'openai',
model: 'gpt-4o-mini',
maxTokens: 150,