diff --git a/package.json b/package.json index 5f205dc..5115f8c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@magicul/react-chat-stream", "description": "A React hook that lets you easily integrate your custom ChatGPT-like chat in React.", - "version": "0.5.2", + "version": "0.5.3", "main": "dist/index.js", "types": "dist/index.d.ts", "homepage": "https://github.com/XD2Sketch/react-chat-stream#readme", diff --git a/src/utils/streams.ts b/src/utils/streams.ts index 153f8ca..b61e4ec 100644 --- a/src/utils/streams.ts +++ b/src/utils/streams.ts @@ -18,6 +18,7 @@ export const getStream = async (input: string, options: UseChatStreamOptions, me const response = await fetch(options.url + params, { method: options.method, + credentials: 'include', headers: { ...DEFAULT_HEADERS, ...options.headers }, body: JSON.stringify(options.body, (_k, v) => v === null ? undefined : v) });