Skip to content

Commit

Permalink
fix: bug in traces, missing input values
Browse files Browse the repository at this point in the history
  • Loading branch information
dosco committed Nov 20, 2024
1 parent 2c96fc1 commit d8a8ee5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ax/dsp/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export class AxGen<
}

assertRequiredFields(sig, output);
this.trace = { ...output };
this.trace = { ...values, ...output };
return output;
} catch (e) {
let extraFields;
Expand Down
5 changes: 3 additions & 2 deletions src/examples/summarize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const noteText = `The technological singularity—or simply the singularity[1]
// const ai = new AxAI({ name: 'ollama', model: 'nous-hermes2' });

const gen = new AxChainOfThought(
ai,
`noteText -> shortSummary "summarize in 5 to 10 words"`
);
gen.setExamples([
Expand Down Expand Up @@ -44,4 +43,6 @@ const res = await gen.forward(
{ modelConfig: { stream: true } }
);

console.log('>', res);
console.log('Traces:\n', gen.getTraces());

console.log('Result:\n', res);

0 comments on commit d8a8ee5

Please sign in to comment.