Skip to content

Type Alias: ContextShiftOptions

ts
type ContextShiftOptions: {
  size: number | (sequence: LlamaContextSequence) => number | Promise<number>;
  strategy: "eraseBeginning" | (options: {
     sequence: LlamaContextSequence;
     size: number;
    }) => ContextTokensDeleteRange[] | Promise<ContextTokensDeleteRange[]>;
};

Type declaration

size?

ts
optional size: number | (sequence: LlamaContextSequence) => number | Promise<number>;

strategy?

ts
optional strategy: "eraseBeginning" | (options: {
  sequence: LlamaContextSequence;
  size: number;
 }) => ContextTokensDeleteRange[] | Promise<ContextTokensDeleteRange[]>;

Defined in

evaluator/LlamaContext/types.ts:250