Skip to content

Commit dbc1465

Browse files
committed
Show the correct used model in message info
1 parent 3c0ebae commit dbc1465

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/client/components/ChatV2/ModelSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const ModelSelector = ({
4848
data-testid="model-selector"
4949
disabled={availableModels.length === 1}
5050
>
51-
{`${t('admin:model')}: ${currentModel}`}
51+
{`${t('admin:model')}: ${activePrompt?.model ?? currentModel}`}
5252
</OutlineButtonBlack>
5353
<Menu
5454
anchorEl={anchorEl}

src/client/components/ChatV2/PromptState.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,14 @@ export const PromptStateProvider: React.FC<{
156156
})
157157

158158
const promptInfo: MessageGenerationInfo['promptInfo'] = activePrompt
159-
? { id: activePrompt.id, name: activePrompt.name, type: 'saved', systemMessage: activePrompt.systemMessage }
159+
? {
160+
id: activePrompt.id,
161+
name: activePrompt.name,
162+
type: 'saved',
163+
systemMessage: activePrompt.systemMessage,
164+
model: activePrompt.model,
165+
temperature: activePrompt.temperature,
166+
}
160167
: { type: 'custom', systemMessage: customSystemMessage }
161168

162169
const value = {

src/shared/chat.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ export const MessageGenerationInfoSchema = z.object({
6565
id: z.string(),
6666
name: z.string(),
6767
systemMessage: z.string().optional(),
68+
model: z.string().optional(),
69+
temperature: z.number().min(0).max(1).optional(),
6870
}),
6971
z.object({
7072
type: z.literal('custom'),

0 commit comments

Comments
 (0)