Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieFRuan committed Aug 12, 2024
1 parent ef27ebc commit 53f7d04
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/openai_api_protocols/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ export const CompletionCreateParamsUnsupportedFields: Array<string> = [
*/
export function postInitAndCheckFields(
request: CompletionCreateParams,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
currentModelId: string,
): void {
// 1. Check unsupported fields in request
Expand Down
3 changes: 2 additions & 1 deletion src/openai_api_protocols/embedding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -156,6 +156,7 @@ export const EmbeddingCreateParamsUnsupportedFields: Array<string> = [

export function postInitAndCheckFields(
request: EmbeddingCreateParams,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
currentModelId: string,
): void {
// 1. Check unsupported fields in request
Expand Down
3 changes: 0 additions & 3 deletions tests/function_calling.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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: [
Expand Down
1 change: 0 additions & 1 deletion tests/multi_round_chat.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
ChatCompletionRequest,
ChatCompletionUserMessageParam,
} from "../src/openai_api_protocols/chat_completion";
import { MLCEngine } from "../src/engine";
import {
Conversation,
compareConversationObject,
Expand Down

0 comments on commit 53f7d04

Please sign in to comment.