blob: 776e757400a084796c6405a7f71847f052dd0c0a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import { OpenAI } from "openai"
import { withSupermemory } from "../src/openai"
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
})
const openaiWithSupermemory = withSupermemory(openai, "user_id_life", {
verbose: true,
mode: "full",
addMemory: "always",
})
const response = await openaiWithSupermemory.responses.create({
model: "gpt-4o",
instructions: "you are ai girlfriend",
input: "Where do i live?",
})
console.log("Response output:", JSON.stringify(response.output[0], null, 2))
console.log("Usage:", response.usage)
|