Search

4,144 results found for openai (4441ms)

Code
4,036

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" },
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 { nanoid } from "https://esm.sh/nanoid@5.0.5";
import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
import { Configuration, OpenAIApi } from "npm:openai";
const TABLE_NAME = `memories`;
async function generateFunFacts(previousFacts) {
try {
const apiKey = Deno.env.get("OPENAI_API_KEY");
if (!apiKey) {
console.error("OpenAI API key is not configured.");
return null;
}
const configuration = new Configuration({ apiKey });
const openai = new OpenAIApi(configuration);
const previousFactsText = previousFacts
`;
const completion = await openai.createChatCompletion({
model: "gpt-4", // 可以选择 "gpt-3.5-turbo"
messages: [

Vals

94
View more
Ronsykes
hello-realtime
Sample app for the OpenAI Realtime API
Public
Ronsykes
hello-realtime-rs
Sample app for the OpenAI Realtime API
Public
dcm31
turso_events_estimator
Estimate OpenAI calls from Turso GitHub events
Public
fancylamp
hello-realtime
Sample app for the OpenAI Realtime API
Public
peterqliu
PineconeIndex
Vector db's on Pinecone, with OpenAI embeddings
Public

Docs

11
View more
No docs found