diff --git a/examples/README.md b/examples/README.md index ee3b16f6..c36589f7 100644 --- a/examples/README.md +++ b/examples/README.md @@ -24,7 +24,7 @@ Note that all examples below run in-browser and use WebGPU as a backend. - [next-simple-chat](next-simple-chat): a mininum and complete chat bot app with [Next.js](https://nextjs.org/). - [multi-round-chat](multi-round-chat): while APIs are functional, we internally optimize so that multi round chat usage can reuse KV cache - [text-completion](text-completion): demonstrates API `engine.completions.create()`, which is pure text completion with no conversation, as opposed to `engine.chat.completions.create()` -- [embeddings](embeddings): demonstrates API `engine.embeddings.create()`, and integration with `EmbeddingsInterface` and `MemoryVectorStore` of Langchain.js +- [embeddings](embeddings): demonstrates API `engine.embeddings.create()`, and integration with `EmbeddingsInterface` and `MemoryVectorStore` of [Langchain.js](js.langchain.com) #### Advanced OpenAI API Capabilities 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..39d4685c 100644 --- a/tests/function_calling.test.ts +++ b/tests/function_calling.test.ts @@ -10,7 +10,6 @@ import { getConversationFromChatCompletionRequest, getFunctionCallUsage, } from "../src/conversation"; -import { MLCEngine } from "../src/engine"; import { ChatCompletionRequest } from "../src/openai_api_protocols/chat_completion"; import { describe, expect, test } from "@jest/globals"; @@ -133,8 +132,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,