Skip to documentation
Docs navigation
Docs/OpenAILLMAdapter
Provider Adapters

OpenAILLMAdapter

Adapt an OpenAI chat model to MemoGrafter’s provider-neutral language-model interface.

What it does

Adapt an OpenAI chat model to MemoGrafter’s provider-neutral language-model interface.

Pass the adapter into MemoGrafter configuration so the rest of the memory pipeline remains independent of the provider SDK.

Signature

TypeScript
new OpenAILLMAdapter(model?: string, options?: OpenAILLMAdapterOptions)

Parameters

model? (string) — Optional operation-specific settings.
options? (OpenAILLMAdapterOptions) — A typed options object. The applicable fields and defaults are documented below.

Result

The requested identifier or text value.

Example

example.ts
const llm = new OpenAILLMAdapter("gpt-4o-mini", { streaming: true });