Skip to content

Commit c28ff68

Browse files
committed
Remove default max_tokens and allow configuring llm args from step
1 parent 3f85275 commit c28ff68

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

packages/litlytics/engine/step/runLLMStep.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export async function runLLMStep({
7979

8080
const user = input;
8181
const startTime = performance.now();
82-
const res = await litlytics.runPrompt({ system, user });
82+
const res = await litlytics.runPrompt({ system, user, args: step.llmArgs });
8383
const endTime = performance.now();
8484
// replace existing result if present
8585
const existingResult = doc?.processingResults.find(

packages/litlytics/llm/llm.ts

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ export async function executeOnLLM({
8080
// set key
8181
const modelObj = getModel({ provider, model, key });
8282
const { text, usage } = await generateText({
83-
maxTokens: 4096,
8483
...modelArgs,
8584
model: modelObj,
8685
messages,

packages/litlytics/step/Step.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { LanguageModelUsage } from 'ai';
1+
import type { CoreTool, LanguageModelUsage } from 'ai';
22
import type { Doc } from '../doc/Document';
33

44
export interface StepResult {
@@ -44,7 +44,10 @@ export interface SourceStep extends BaseStep {
4444
export interface ProcessingStep extends BaseStep {
4545
type: ProcessingStepTypes;
4646
input?: StepInput;
47+
// llm
4748
prompt?: string;
49+
llmArgs?: Record<string, CoreTool>;
50+
// code
4851
code?: string;
4952
codeExplanation?: string;
5053
}

0 commit comments

Comments
 (0)