Skip to content

Commit

Permalink
feat(llm): update ollama default parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas2D committed Oct 3, 2024
1 parent 4491d96 commit a9dc1a9
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/adapters/ollama/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,17 @@ export class OllamaChatLLM extends ChatLLM<OllamaChatLLMOutput> {
public readonly parameters: Partial<Parameters>;

constructor(
{
client,
modelId = "llama3.1",
parameters = { temperature: 0 },
executionOptions = {},
}: Input = {
{ client, modelId, parameters, executionOptions = {} }: Input = {
modelId: "llama3.1",
parameters: {
temperature: 0,
},
},
) {
super(modelId, executionOptions);
this.client = client ?? new Client({ fetch });
this.parameters = parameters ?? {};
this.parameters = parameters ?? {
temperature: 0,
repeat_penalty: 1.0,
num_predict: 2048,
};
}

static {
Expand Down

0 comments on commit a9dc1a9

Please sign in to comment.