SDK ReferenceFunctions
openaiConfig()
Function: openaiConfig()
openaiConfig(
opts?):object
Defined in: packages/sdk/src/sdk.ts:165
Base URL + key for pointing an OpenAI client at Libra's OpenAI-compatible
endpoint. Use the agent name as the model:
import OpenAI from "openai";
const client = new OpenAI(openaiConfig());
await client.chat.completions.create({ model: "support-bot", messages });Parameters
opts?
MemoryClientOptions = {}
Returns
object
apiKey
apiKey:
string
baseURL
baseURL:
string