Constructors
constructor
- new ThoughtRuntime(openai, model?): ThoughtRuntime
Parameters
- openai: OpenAI
- model: string = 'gpt-4o-mini'
Methods
executeGraph
- executeGraph(graph, input, scope?): Promise<ThoughtResult<any>[]>
getStats
- getStats(): {
runtimeId: string;
memoryScopes: string[];
traceCount: number;
totalExecutions: number;
} Returns {
runtimeId: string;
memoryScopes: string[];
traceCount: number;
totalExecutions: number;
}
runtimeId: string
memoryScopes: string[]
traceCount: number
totalExecutions: number
clear
- clear(scope?): void
Returns void
export
- export(): {
runtimeId: string;
memory: Record<string, Record<string, any>>;
trace: ExecutionTrace[];
stats: {
runtimeId: string;
memoryScopes: string[];
traceCount: number;
totalExecutions: number;
};
} Returns {
runtimeId: string;
memory: Record<string, Record<string, any>>;
trace: ExecutionTrace[];
stats: {
runtimeId: string;
memoryScopes: string[];
traceCount: number;
totalExecutions: number;
};
}
runtimeId: string
memory: Record<string, Record<string, any>>
stats: {
runtimeId: string;
memoryScopes: string[];
traceCount: number;
totalExecutions: number;
}
runtimeId: string
memoryScopes: string[]
traceCount: number
totalExecutions: number
Orchestrates execution of ThoughtModules and ThoughtGraphs. Provides the main runtime environment for the ThoughtSystem.