fix: update evaluator test cases to use proper AnswerAction type

Co-Authored-By: Han Xiao <han.xiao@jina.ai>
This commit is contained in:
Devin AI 2025-02-11 09:36:15 +00:00
parent fd7dd8dbe8
commit 03cb5a45d4

View File

@ -25,7 +25,12 @@ describe('evaluateAnswer', () => {
const tokenTracker = new TokenTracker();
const { response } = await evaluateAnswer(
'What is TypeScript?',
'TypeScript is a strongly typed programming language that builds on JavaScript.',
{
action: 'answer',
think: 'Providing a clear definition of TypeScript',
answer: 'TypeScript is a strongly typed programming language that builds on JavaScript.',
references: []
},
['definitive'],
tokenTracker
);
@ -38,7 +43,12 @@ describe('evaluateAnswer', () => {
const tokenTracker = new TokenTracker();
const { response } = await evaluateAnswer(
'List three programming languages.',
'Python is a programming language.',
{
action: 'answer',
think: 'Providing a single programming language instead of three',
answer: 'Python is a programming language.',
references: []
},
['plurality'],
tokenTracker
);