Skip to content

Commit

Permalink
fix (ai/react): add missing fetch parameter to useChat
Browse files Browse the repository at this point in the history
  • Loading branch information
lgrammel committed Jul 1, 2024
1 parent 98a6466 commit 953927d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/bright-adults-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ai-sdk/react': patch
---

fix (ai/react): add missing fetch parameter to useChat
2 changes: 2 additions & 0 deletions packages/react/src/use-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ export function useChat({
headers,
body,
generateId = generateIdFunc,
fetch,
}: UseChatOptions & {
key?: string;

Expand Down Expand Up @@ -405,6 +406,7 @@ By default, it's set to 0, which will disable the feature.
messagesRef,
abortControllerRef,
generateId,
fetch,
],
);

Expand Down

0 comments on commit 953927d

Please sign in to comment.