From e99f851c76aacf34c379fcacff642c054d67b842 Mon Sep 17 00:00:00 2001 From: Eric Zawadski Date: Thu, 9 Jan 2025 14:07:43 -0800 Subject: [PATCH] feat(assistants_web): use agent temperature for chat requests --- src/interfaces/assistants_web/src/app/(main)/(chat)/Chat.tsx | 1 + .../assistants_web/src/stores/slices/paramsSlice.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/interfaces/assistants_web/src/app/(main)/(chat)/Chat.tsx b/src/interfaces/assistants_web/src/app/(main)/(chat)/Chat.tsx index 9d0a5aa71b..a17ae38716 100644 --- a/src/interfaces/assistants_web/src/app/(main)/(chat)/Chat.tsx +++ b/src/interfaces/assistants_web/src/app/(main)/(chat)/Chat.tsx @@ -49,6 +49,7 @@ const Chat: React.FC<{ agentId?: string; conversationId?: string }> = ({ const fileIds = conversation?.files.map((file) => file.id); setParams({ + temperature: agent?.temperature, tools: agentTools, fileIds, }); diff --git a/src/interfaces/assistants_web/src/stores/slices/paramsSlice.ts b/src/interfaces/assistants_web/src/stores/slices/paramsSlice.ts index 9146bc01f3..df0e8f20ee 100644 --- a/src/interfaces/assistants_web/src/stores/slices/paramsSlice.ts +++ b/src/interfaces/assistants_web/src/stores/slices/paramsSlice.ts @@ -1,12 +1,12 @@ import { StateCreator } from 'zustand'; -import { CohereChatRequest, DEFAULT_CHAT_TEMPERATURE } from '@/cohere-client'; +import { CohereChatRequest } from '@/cohere-client'; import { StoreState } from '..'; const INITIAL_STATE: ConfigurableParams = { model: undefined, - temperature: DEFAULT_CHAT_TEMPERATURE, + temperature: undefined, preamble: '', tools: [], fileIds: [],