forked from XiaoMo/ChatGPT-Next-Web
feat: support custom gemini pro params
This commit is contained in:
parent
75057f9a91
commit
7c3dfb7bae
@ -34,6 +34,15 @@ export class GeminiProApi implements LLMApi {
|
|||||||
};
|
};
|
||||||
const requestPayload = {
|
const requestPayload = {
|
||||||
contents: messages,
|
contents: messages,
|
||||||
|
generationConfig: {
|
||||||
|
// stopSequences: [
|
||||||
|
// "Title"
|
||||||
|
// ],
|
||||||
|
temperature: modelConfig.temperature,
|
||||||
|
maxOutputTokens: modelConfig.max_tokens,
|
||||||
|
topP: modelConfig.top_p,
|
||||||
|
// "topK": modelConfig.top_k,
|
||||||
|
},
|
||||||
// stream: options.config.stream,
|
// stream: options.config.stream,
|
||||||
// model: modelConfig.model,
|
// model: modelConfig.model,
|
||||||
// temperature: modelConfig.temperature,
|
// temperature: modelConfig.temperature,
|
||||||
|
@ -91,6 +91,9 @@ export function ModelConfigList(props: {
|
|||||||
}
|
}
|
||||||
></input>
|
></input>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
|
||||||
|
{props.modelConfig.model === "gemini-pro" ? null : (
|
||||||
|
<>
|
||||||
<ListItem
|
<ListItem
|
||||||
title={Locale.Settings.PresencePenalty.Title}
|
title={Locale.Settings.PresencePenalty.Title}
|
||||||
subTitle={Locale.Settings.PresencePenalty.SubTitle}
|
subTitle={Locale.Settings.PresencePenalty.SubTitle}
|
||||||
@ -143,7 +146,8 @@ export function ModelConfigList(props: {
|
|||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
props.updateConfig(
|
props.updateConfig(
|
||||||
(config) =>
|
(config) =>
|
||||||
(config.enableInjectSystemPrompts = e.currentTarget.checked),
|
(config.enableInjectSystemPrompts =
|
||||||
|
e.currentTarget.checked),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
></input>
|
></input>
|
||||||
@ -163,7 +167,8 @@ export function ModelConfigList(props: {
|
|||||||
}
|
}
|
||||||
></input>
|
></input>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<ListItem
|
<ListItem
|
||||||
title={Locale.Settings.HistoryCount.Title}
|
title={Locale.Settings.HistoryCount.Title}
|
||||||
subTitle={Locale.Settings.HistoryCount.SubTitle}
|
subTitle={Locale.Settings.HistoryCount.SubTitle}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user