Skip to content

Commit

Permalink
DX-932: Cleanup Interface Fields
Browse files Browse the repository at this point in the history
  • Loading branch information
fahreddinozcan committed May 20, 2024
1 parent ebaba3b commit d6ade13
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/custom-llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,14 @@ export interface UpstashLLMParameters extends BaseLLMParams {
/** Sampling temperature to use */
temperature?: number;

/** Minimum number of tokens to generate. */
minTokens?: number;

/** Maximum number of tokens to generate in the completion. */
maxTokens?: number;

/** Generates this many completions server-side and returns the "best"." */
bestOf?: number;

/** Penalizes repeated tokens according to frequency. */
frequencyPenalty?: number;

/** Penalizes repeated tokens regardless of frequency. */
presencePenalty?: number;

/** Total probability mass of tokens to consider at each step. */
topP?: number;

/** Count of chars in a stream chunk */
n?: number;
}

export default class UpstashLLM extends LLM {
Expand Down Expand Up @@ -62,9 +53,8 @@ export default class UpstashLLM extends LLM {
this.topP = fields.topP ?? this.topP;
this.temperature = fields.temperature ?? this.temperature;
this.maxTokens = fields.maxTokens ?? this.maxTokens;
this.frequencyPenalty = fields.frequencyPenalty ?? this.frequencyPenalty;
this.presencePenalty = fields.presencePenalty ?? this.presencePenalty;
this.model = fields.model ?? this.model;
this.n = fields.n ?? this.n;
this.apiKey = fields.apiKey;
}

Expand Down

0 comments on commit d6ade13

Please sign in to comment.