Skip to content

Commit 6412a69

Browse files
committed
docs(ai-chat): correct the extractNewToolResults return type
1 parent 3b91999 commit 6412a69

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

docs/ai-chat/patterns/tool-result-auditing.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,11 @@ await auditLog.upsert({
112112
## What `extractNewToolResults` returns
113113

114114
```ts
115-
type ExtractedToolResult = {
115+
type ChatNewToolResult = {
116116
toolCallId: string;
117117
toolName: string;
118-
input: unknown; // The arguments the model passed when calling the tool
119-
output?: unknown; // The tool's return value (output-available state)
120-
errorText?: string; // Error message (output-error state)
118+
output: unknown; // The tool's return value (carries the resolved value; in output-error state see errorText)
119+
errorText?: string; // Set iff the part is in output-error state
121120
};
122121
```
123122

0 commit comments

Comments
 (0)