Skip to content

Commit

Permalink
feat: use model options
Browse files Browse the repository at this point in the history
  • Loading branch information
sgomez committed May 8, 2024
1 parent 4b083ae commit 4520887
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ollama-chat-language-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ export class OllamaChatLanguageModel implements LanguageModelV1 {
}

private getArguments({
frequencyPenalty,
mode,
presencePenalty,
prompt,
seed,
temperature,
topP,
}: Parameters<LanguageModelV1['doGenerate']>[0]) {
const type = mode.type

Expand All @@ -53,7 +57,11 @@ export class OllamaChatLanguageModel implements LanguageModelV1 {
messages: convertToOllamaChatMessages(prompt),
model: this.modelId,
options: {
frequency_penalty: frequencyPenalty,
presence_penalty: presencePenalty,
seed,
temperature,
top_p: topP,
},
}

Expand Down

0 comments on commit 4520887

Please sign in to comment.