Skip to content

Commit bd7f6bf

Browse files
committed
style: lint
1 parent 38f56f4 commit bd7f6bf

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/evaluator/LlamaChat/LlamaChat.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {EvaluationPriority} from "../LlamaContext/types.js";
1515
import {maxRecentDetokenizerTokens, UNKNOWN_UNICODE_CHAR} from "../../consts.js";
1616
import {getQueuedTokensBeforeStopTrigger} from "../../utils/getQueuedTokensBeforeStopTrigger.js";
1717
import {resolveChatWrapper} from "../../chatWrappers/utils/resolveChatWrapper.js";
18-
import {GeneralChatWrapper} from "../../chatWrappers/GeneralChatWrapper.js";
1918
import {TokenBias} from "../TokenBias.js";
2019
import {safeEventCallback} from "../../utils/safeEventCallback.js";
2120
import {pushAll} from "../../utils/pushAll.js";

src/evaluator/LlamaRankingContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class LlamaRankingContext {
9797
/**
9898
* Get the ranking scores for all the given documents for a query.
9999
*/
100-
public async rankAll(query: Token[] | string | LlamaText, documents: Array<Token[] | string | LlamaText>): Promise<number[]> {{}
100+
public async rankAll(query: Token[] | string | LlamaText, documents: Array<Token[] | string | LlamaText>): Promise<number[]> {
101101
const resolvedTokens = documents.map((document) => this._getEvaluationInput(query, document));
102102

103103
if (resolvedTokens.some((tokens) => tokens.length > this._llamaContext.contextSize))

test/modelDependent/bgeReranker/rank.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ describe("bgeReranker", () => {
3838
const highestRankIndex = ranks.indexOf(highestRank);
3939

4040
const highestRankDocument = documents[highestRankIndex];
41-
expect(highestRankDocument).to.eql("Mount Everest is the tallest mountain in the world",);
41+
expect(highestRankDocument).to.eql("Mount Everest is the tallest mountain in the world");
4242

43-
expect(simplifyRanks([highestRank])[0]).toMatchInlineSnapshot(`-4`);
43+
expect(simplifyRanks([highestRank])[0]).toMatchInlineSnapshot("-4");
4444
expect(simplifyRanks(ranks)).toMatchInlineSnapshot(`
4545
[
4646
-11,
@@ -89,9 +89,9 @@ describe("bgeReranker", () => {
8989
const highestRankIndex = ranks.indexOf(highestRank);
9090

9191
const highestRankDocument = documents[highestRankIndex];
92-
expect(highestRankDocument).to.eql("Mount Everest is the tallest mountain in the world",);
92+
expect(highestRankDocument).to.eql("Mount Everest is the tallest mountain in the world");
9393

94-
expect(simplifyRanks([highestRank])[0]).toMatchInlineSnapshot(`-4`);
94+
expect(simplifyRanks([highestRank])[0]).toMatchInlineSnapshot("-4");
9595
expect(simplifyRanks(ranks)).toMatchInlineSnapshot(`
9696
[
9797
-11,
@@ -137,7 +137,7 @@ describe("bgeReranker", () => {
137137

138138
const topDocument = rankedDocuments[0]!;
139139

140-
expect(topDocument.document).to.eql("Mount Everest is the tallest mountain in the world",);
140+
expect(topDocument.document).to.eql("Mount Everest is the tallest mountain in the world");
141141

142142
expect(simplifySortedRanks([topDocument])[0]).toMatchInlineSnapshot(`
143143
{

0 commit comments

Comments
 (0)