Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

LogRecordsWriter.md

33 lines723 Bytes

1---
2id: LogRecordsWriter
3title: LogRecordsWriter
4---
5​
6Defined in: packages/ai/src/activities/chat/middleware/log-records.ts:16
7​
8Appends records to the session log that a host keeps. A host is a
9middleware that provides this capability. `chat()` does not provide it.
10​
11## Properties
12​
13### append
14​
15```ts
16append: (records) => Promise<void>;
17```
18​
19Defined in: packages/ai/src/activities/chat/middleware/log-records.ts:22
20​
21Resolves when the host has written all the records. Rejects when the
22host refuses a record or the write fails. Then the host writes none of
23the records. The host decides which record types it accepts.
24​
25#### Parameters
26​
27##### records
28​
29readonly [`LogRecord`](LogRecord.md)[]
30​
31#### Returns
32​
33`Promise`\<`void`\>