setShowPicker(true)}
+ style={{ cursor: "pointer" }}
+ >
{session.avatar ? (
) : (
diff --git a/app/components/model-config.tsx b/app/components/model-config.tsx
index 112e6b2e..797bcb37 100644
--- a/app/components/model-config.tsx
+++ b/app/components/model-config.tsx
@@ -37,7 +37,7 @@ export function ModelConfigList(props: {
{
props.updateConfig(
diff --git a/app/requests.ts b/app/requests.ts
index 0e757090..6ab075a8 100644
--- a/app/requests.ts
+++ b/app/requests.ts
@@ -28,11 +28,10 @@ const makeRequestParam = (
sendMessages = sendMessages.filter((m) => m.role !== "assistant");
}
- const modelConfig = { ...useAppConfig.getState().modelConfig };
-
- // @yidadaa: wont send max_tokens, because it is nonsense for Muggles
- // @ts-expect-error
- delete modelConfig.max_tokens;
+ const modelConfig = {
+ ...useAppConfig.getState().modelConfig,
+ ...useChatStore.getState().currentSession().modelConfig,
+ };
// override model config
if (options?.model) {
@@ -42,7 +41,9 @@ const makeRequestParam = (
return {
messages: sendMessages,
stream: options?.stream,
- ...modelConfig,
+ model: modelConfig.model,
+ temperature: modelConfig.temperature,
+ presence_penalty: modelConfig.presence_penalty,
};
};
diff --git a/app/store/config.ts b/app/store/config.ts
index 05d3383d..06a95835 100644
--- a/app/store/config.ts
+++ b/app/store/config.ts
@@ -108,7 +108,7 @@ export const ModalConfigValidator = {
return limitNumber(x, -2, 2, 0);
},
temperature(x: number) {
- return limitNumber(x, 0, 2, 1);
+ return limitNumber(x, 0, 1, 1);
},
};