Class: DefaultRun
Implements
Constructors
constructor
• new DefaultRun(«destructured»?
): DefaultRun
Parameters
Name | Type |
---|---|
«destructured» | Object |
› abortSignal? | AbortSignal |
› errorHandler? | ErrorHandler |
› observers? | FunctionObserver [] |
› runId? | string |
› sessionId? | string |
› userId? | string |
Returns
Defined in
packages/modelfusion/src/core/DefaultRun.ts:23
Methods
getSuccessfulModelCalls
▸ getSuccessfulModelCalls(): ModelCallFinishedEvent
& { result
: { status
: "success"
} }[]
Returns
ModelCallFinishedEvent
& { result
: { status
: "success"
} }[]
Defined in
packages/modelfusion/src/core/DefaultRun.ts:58
Properties
abortSignal
• Optional
Readonly
abortSignal: AbortSignal
An AbortSignal that can be used to cancel any ongoing asynchronous operations tied to the run.
Implementation of
Defined in
packages/modelfusion/src/core/DefaultRun.ts:15
errorHandler
• Readonly
errorHandler: ErrorHandler
Implementation of
Defined in
packages/modelfusion/src/core/DefaultRun.ts:17
events
• Readonly
events: FunctionEvent
[] = []
Defined in
packages/modelfusion/src/core/DefaultRun.ts:19
functionObserver
• Readonly
functionObserver: Object
Optional field that represents the run as a function observer. When it is defined, the run will be notified of all function events.
Type declaration
Name | Type |
---|---|
onFunctionEvent | (event : FunctionEvent ) => void |
Implementation of
Defined in
packages/modelfusion/src/core/DefaultRun.ts:51
runId
• Readonly
runId: string
Unique identifier for a specific run. Primarily utilized for efficient referencing and tracking within logs.
Implementation of
Defined in
packages/modelfusion/src/core/DefaultRun.ts:11
sessionId
• Optional
Readonly
sessionId: string
Unique identifier for a session. A session can contain multiple runs. For example, in a chatbot where each message is processed as a separate run, all those runs could be part of a single session. Useful for tracking and logging.
Implementation of
Defined in
packages/modelfusion/src/core/DefaultRun.ts:12
userId
• Optional
Readonly
userId: string
The user ID of the individual who initiates the call. Useful for logging and can be configured to be forwarded to the model provider (like OpenAI).