From a75650a22ed022e3f9809f833d86e7e9089cace7 Mon Sep 17 00:00:00 2001 From: Charlie Ruan <53290280+CharlieFRuan@users.noreply.github.com> Date: Mon, 12 Aug 2024 02:36:52 -0400 Subject: [PATCH] Fix lint --- src/openai_api_protocols/completion.ts | 1 + src/openai_api_protocols/embedding.ts | 3 ++- tests/function_calling.test.ts | 2 -- tests/multi_round_chat.test.ts | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/openai_api_protocols/completion.ts b/src/openai_api_protocols/completion.ts index ec12b154..66e0714c 100644 --- a/src/openai_api_protocols/completion.ts +++ b/src/openai_api_protocols/completion.ts @@ -319,6 +319,7 @@ export const CompletionCreateParamsUnsupportedFields: Array = [ */ export function postInitAndCheckFields( request: CompletionCreateParams, + // eslint-disable-next-line @typescript-eslint/no-unused-vars currentModelId: string, ): void { // 1. Check unsupported fields in request diff --git a/src/openai_api_protocols/embedding.ts b/src/openai_api_protocols/embedding.ts index 8edf20af..f5eeef24 100644 --- a/src/openai_api_protocols/embedding.ts +++ b/src/openai_api_protocols/embedding.ts @@ -59,7 +59,7 @@ export interface CreateEmbeddingResponse { usage: CreateEmbeddingResponse.Usage; } -/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable-next-line @typescript-eslint/no-namespace */ export namespace CreateEmbeddingResponse { /** * The usage information for the request. @@ -156,6 +156,7 @@ export const EmbeddingCreateParamsUnsupportedFields: Array = [ export function postInitAndCheckFields( request: EmbeddingCreateParams, + // eslint-disable-next-line @typescript-eslint/no-unused-vars currentModelId: string, ): void { // 1. Check unsupported fields in request diff --git a/tests/function_calling.test.ts b/tests/function_calling.test.ts index f04838cb..639bbd08 100644 --- a/tests/function_calling.test.ts +++ b/tests/function_calling.test.ts @@ -133,8 +133,6 @@ describe("Test gorilla MLCEngine", () => { }); test("Test getFunctionCallUsage auto", () => { - const engine = new MLCEngine(); - const request: ChatCompletionRequest = { model: "gorilla-openfunctions-v1-q4f16_1_MLC", messages: [ diff --git a/tests/multi_round_chat.test.ts b/tests/multi_round_chat.test.ts index 8746b3cc..54ad3fe8 100644 --- a/tests/multi_round_chat.test.ts +++ b/tests/multi_round_chat.test.ts @@ -5,7 +5,6 @@ import { ChatCompletionRequest, ChatCompletionUserMessageParam, } from "../src/openai_api_protocols/chat_completion"; -import { MLCEngine } from "../src/engine"; import { Conversation, compareConversationObject,