mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-04-20 03:02:51 -04:00
fix(anthropic): remove top_p parameter for Claude 4.5 models
Fixes #520.
This commit is contained in:
@@ -37,9 +37,14 @@ export class AnthropicEngine implements AiEngine {
|
||||
system: systemMessage,
|
||||
messages: restMessages,
|
||||
temperature: 0,
|
||||
top_p: 0.1,
|
||||
max_tokens: this.config.maxTokensOutput
|
||||
};
|
||||
|
||||
// add top_p for non-4.5 models
|
||||
if (!params.model.includes('-4-5')) {
|
||||
params.top_p = 0.1;
|
||||
}
|
||||
|
||||
try {
|
||||
const REQUEST_TOKENS = messages
|
||||
.map((msg) => tokenCount(msg.content as string) + 4)
|
||||
|
||||
Reference in New Issue
Block a user