mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
remove topp default value 0.0 (#785)
This commit is contained in:
@@ -434,8 +434,6 @@ describe('Gemini Client (client.ts)', () => {
|
|||||||
config: {
|
config: {
|
||||||
abortSignal,
|
abortSignal,
|
||||||
systemInstruction: getCoreSystemPrompt(''),
|
systemInstruction: getCoreSystemPrompt(''),
|
||||||
temperature: 0,
|
|
||||||
topP: 1,
|
|
||||||
tools: [
|
tools: [
|
||||||
{
|
{
|
||||||
functionDeclarations: [
|
functionDeclarations: [
|
||||||
@@ -486,7 +484,6 @@ describe('Gemini Client (client.ts)', () => {
|
|||||||
abortSignal,
|
abortSignal,
|
||||||
systemInstruction: getCoreSystemPrompt(''),
|
systemInstruction: getCoreSystemPrompt(''),
|
||||||
temperature: 0.9,
|
temperature: 0.9,
|
||||||
topP: 1, // from default
|
|
||||||
topK: 20,
|
topK: 20,
|
||||||
tools: [
|
tools: [
|
||||||
{
|
{
|
||||||
@@ -2461,7 +2458,6 @@ ${JSON.stringify(
|
|||||||
abortSignal,
|
abortSignal,
|
||||||
systemInstruction: getCoreSystemPrompt(''),
|
systemInstruction: getCoreSystemPrompt(''),
|
||||||
temperature: 0.5,
|
temperature: 0.5,
|
||||||
topP: 1,
|
|
||||||
},
|
},
|
||||||
contents,
|
contents,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -115,10 +115,7 @@ export class GeminiClient {
|
|||||||
private chat?: GeminiChat;
|
private chat?: GeminiChat;
|
||||||
private contentGenerator?: ContentGenerator;
|
private contentGenerator?: ContentGenerator;
|
||||||
private readonly embeddingModel: string;
|
private readonly embeddingModel: string;
|
||||||
private readonly generateContentConfig: GenerateContentConfig = {
|
private readonly generateContentConfig: GenerateContentConfig = {};
|
||||||
temperature: 0,
|
|
||||||
topP: 1,
|
|
||||||
};
|
|
||||||
private sessionTurnCount = 0;
|
private sessionTurnCount = 0;
|
||||||
|
|
||||||
private readonly loopDetector: LoopDetectionService;
|
private readonly loopDetector: LoopDetectionService;
|
||||||
|
|||||||
@@ -302,9 +302,9 @@ export class ContentGenerationPipeline {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
// Parameters with request fallback and defaults
|
// Parameters with request fallback but no defaults
|
||||||
temperature: getParameterValue('temperature', 'temperature', 0.0),
|
...addParameterIfDefined('temperature', 'temperature', 'temperature'),
|
||||||
top_p: getParameterValue('top_p', 'topP', 1.0),
|
...addParameterIfDefined('top_p', 'top_p', 'topP'),
|
||||||
|
|
||||||
// Max tokens (special case: different property names)
|
// Max tokens (special case: different property names)
|
||||||
...addParameterIfDefined('max_tokens', 'max_tokens', 'maxOutputTokens'),
|
...addParameterIfDefined('max_tokens', 'max_tokens', 'maxOutputTokens'),
|
||||||
|
|||||||
Reference in New Issue
Block a user