Search

3,298 results found for openai (2692ms)

Code
3,203

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 React from "https://esm.sh/react@18.2.0";
import { blob } from "https://esm.town/v/std/blob";
import { OpenAI } from "https://esm.town/v/std/openai";
import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
export default async function server(request: Request): Promise<Response> {
const KEY = "fortuitousSalmonFox";
const openai = new OpenAI();
const url = new URL(request.url);
import React from "https://esm.sh/react@18.2.0";
import { blob } from "https://esm.town/v/std/blob";
import { OpenAI } from "https://esm.town/v/std/openai";
import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
export default async function server(request: Request): Promise<Response> {
const KEY = "Girlswithjuice";
const openai = new OpenAI();
const url = new URL(request.url);
import React from "https://esm.sh/react@18.2.0";
import { blob } from "https://esm.town/v/std/blob";
import { OpenAI } from "https://esm.town/v/std/openai";
import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
export default async function server(request: Request): Promise<Response> {
const KEY = "lustrousApricotParakeet";
const openai = new OpenAI();
const url = new URL(request.url);
async function generateMotivation(userProgress) {
try {
const { OpenAI } = await import("https://esm.town/v/std/openai");
const openai = new OpenAI();
const motivationPrompt = `Generate a highly personalized, inspiring message for someone who
const response = await openai.chat.completions.create({
model: "gpt-4o-mini",
messages: [{ role: "user", content: motivationPrompt }],
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 { Bot, webhookCallback } from "https://deno.land/x/grammy@v1.35.0/mod.ts";
import { DateTime } from "https://esm.sh/luxon@3.4.4";
import { OpenAI } from "npm:openai";
import { backstory } from "./backstory.ts";
import { formatMemoriesForPrompt, getRelevantMemories } from "./memoryUtils.ts";
*/
async function analyzeMessageContent(
aiClient: OpenAI,
username,
messageText,
try {
// Get Anthropic API key from environment
const apiKey = Deno.env.get("OPENAI_API_KEY");
if (!apiKey) {
console.error("Open AI API key is not configured.");
// Initialize Anthropic client
const client = new OpenAI({
apiKey: apiKey,
});
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" },