API referenceInterfaces
AgentTextStream
Interface: AgentTextStream
Defined in: packages/microfoom-core/src/result.ts:24
A streaming text result. for await yields chunks; awaiting resolves to the
full joined message (chunks are buffered and replayed even after iterating).
Extends
AgentResult<string>.AsyncIterable<string>
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
usage | readonly | AgentUsage | AgentResult.usage | packages/microfoom-core/src/result.ts:17 |
Methods
[asyncIterator]()
asyncIterator: AsyncIterator<string, any, any>;Defined in: docs-website/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts:38
Returns
AsyncIterator<string, any, any>
Inherited from
AsyncIterable.[asyncIterator]abort()
abort(reason?): void;Defined in: packages/microfoom-core/src/result.ts:16
Parameters
| Parameter | Type |
|---|---|
reason? | unknown |
Returns
void
Inherited from
then()
then<TResult1, TResult2>(onfulfilled?, onrejected?): PromiseLike<TResult1 | TResult2>;Defined in: docs-website/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1544
Attaches callbacks for the resolution and/or rejection of the Promise.
Type Parameters
| Type Parameter | Default type |
|---|---|
TResult1 | string |
TResult2 | never |
Parameters
| Parameter | Type | Description |
|---|---|---|
onfulfilled? | ((value) => TResult1 | PromiseLike<TResult1>) | null | The callback to execute when the Promise is resolved. |
onrejected? | ((reason) => TResult2 | PromiseLike<TResult2>) | null | The callback to execute when the Promise is rejected. |
Returns
PromiseLike<TResult1 | TResult2>
A Promise for the completion of which ever callback is executed.
