From 932599deda5678a664ef4745ed6f51832e52325f Mon Sep 17 00:00:00 2001 From: Srujan Gurram Date: Sat, 25 Nov 2023 20:30:09 +0530 Subject: [PATCH] Refactor useChatCompletion to include apiKey, model, and mode in its dependency array --- src/hooks/useChatCompletion.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useChatCompletion.ts b/src/hooks/useChatCompletion.ts index 852dfd27..ec724f1c 100644 --- a/src/hooks/useChatCompletion.ts +++ b/src/hooks/useChatCompletion.ts @@ -45,7 +45,7 @@ export const useChatCompletion = ({ modelName: model, temperature: Number(mode), }), - [], + [apiKey, model, mode], ) const previousMessages = messages.map((msg) => {