Skip to content

Commit

Permalink
deps: update web-llm
Browse files Browse the repository at this point in the history
  • Loading branch information
Neet-Nestor committed Oct 1, 2024
1 parent f3a8d38 commit be05f98
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 25 deletions.
5 changes: 1 addition & 4 deletions app/client/api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
ChatCompletionFinishReason,
CompletionUsage,
} from "@neet-nestor/web-llm";
import { ChatCompletionFinishReason, CompletionUsage } from "@mlc-ai/web-llm";
import { CacheType, Model } from "../store";
export const ROLES = ["system", "user", "assistant"] as const;
export type MessageRole = (typeof ROLES)[number];
Expand Down
5 changes: 1 addition & 4 deletions app/client/mlcllm.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import log from "loglevel";
import { ChatOptions, LLMApi } from "./api";
import {
ChatCompletionFinishReason,
CompletionUsage,
} from "@neet-nestor/web-llm";
import { ChatCompletionFinishReason, CompletionUsage } from "@mlc-ai/web-llm";

export class MlcLLMApi implements LLMApi {
private endpoint: string;
Expand Down
4 changes: 2 additions & 2 deletions app/client/webllm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {
WebWorkerMLCEngine,
CompletionUsage,
ChatCompletionFinishReason,
} from "@neet-nestor/web-llm";
} from "@mlc-ai/web-llm";

import { ChatOptions, LLMApi, LLMConfig, RequestMessage } from "./api";
import { LogLevel } from "@neet-nestor/web-llm";
import { LogLevel } from "@mlc-ai/web-llm";
import { fixMessage } from "../utils";
import { DEFAULT_MODELS } from "../constant";

Expand Down
2 changes: 1 addition & 1 deletion app/components/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Route,
useLocation,
} from "react-router-dom";
import { ServiceWorkerMLCEngine } from "@neet-nestor/web-llm";
import { ServiceWorkerMLCEngine } from "@mlc-ai/web-llm";

import MlcIcon from "../icons/mlc.svg";
import LoadingIcon from "../icons/three-dots.svg";
Expand Down
2 changes: 1 addition & 1 deletion app/components/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { ErrorBoundary } from "./error";
import { InputRange } from "./input-range";
import { useNavigate } from "react-router-dom";
import { nanoid } from "nanoid";
import { LogLevel } from "@neet-nestor/web-llm";
import { LogLevel } from "@mlc-ai/web-llm";
import { WebLLMContext } from "../context";

function EditPromptModal(props: { id: string; onClose: () => void }) {
Expand Down
5 changes: 1 addition & 4 deletions app/store/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ import { RequestMessage, MultimodalContent, LLMApi } from "../client/api";
import { estimateTokenLength } from "../utils/token";
import { nanoid } from "nanoid";
import { createPersistStore } from "../utils/store";
import {
ChatCompletionFinishReason,
CompletionUsage,
} from "@neet-nestor/web-llm";
import { ChatCompletionFinishReason, CompletionUsage } from "@mlc-ai/web-llm";
import { ChatImage } from "../typing";

export type ChatMessage = RequestMessage & {
Expand Down
2 changes: 1 addition & 1 deletion app/store/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LogLevel, prebuiltAppConfig } from "@neet-nestor/web-llm";
import { LogLevel, prebuiltAppConfig } from "@mlc-ai/web-llm";
import { ModelRecord } from "../client/api";
import {
DEFAULT_INPUT_TEMPLATE,
Expand Down
2 changes: 1 addition & 1 deletion app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { showToast } from "./components/ui-lib";
import Locale from "./locales";
import { RequestMessage } from "./client/api";
import { Model } from "./store";
import { ModelType, prebuiltAppConfig } from "@neet-nestor/web-llm";
import { ModelType, prebuiltAppConfig } from "@mlc-ai/web-llm";
import { ChatImage } from "./typing";

export function trimTopic(topic: string) {
Expand Down
2 changes: 1 addition & 1 deletion app/worker/service-worker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ServiceWorkerMLCEngineHandler } from "@neet-nestor/web-llm";
import { ServiceWorkerMLCEngineHandler } from "@mlc-ai/web-llm";
import { defaultCache } from "@serwist/next/worker";
import type { PrecacheEntry, SerwistGlobalConfig } from "serwist";
import { CacheFirst, ExpirationPlugin, Serwist } from "serwist";
Expand Down
2 changes: 1 addition & 1 deletion app/worker/web-worker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import log from "loglevel";
import { WebWorkerMLCEngineHandler } from "@neet-nestor/web-llm";
import { WebWorkerMLCEngineHandler } from "@mlc-ai/web-llm";

let handler: WebWorkerMLCEngineHandler;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@fortaine/fetch-event-source": "^3.0.6",
"@hello-pangea/dnd": "^16.5.0",
"@neet-nestor/web-llm": "^0.2.71",
"@mlc-ai/web-llm": "^0.2.72",
"@serwist/next": "^9.0.2",
"@svgr/webpack": "^6.5.1",
"emoji-picker-react": "^4.9.2",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1180,10 +1180,10 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"

"@neet-nestor/web-llm@^0.2.71":
version "0.2.71"
resolved "https://registry.yarnpkg.com/@neet-nestor/web-llm/-/web-llm-0.2.71.tgz#8dd96fec43ad3ec1c890c60c8999985764262b92"
integrity sha512-cvdFLoCXazp2WvGR3H9OYARAPlz7WrPr2ii1AHGY+FHJZUd0Db7OiSRy+hBxWEtdyeWZyj1dTW8hYhAIiO+Deg==
"@mlc-ai/web-llm@^0.2.72":
version "0.2.72"
resolved "https://registry.yarnpkg.com/@mlc-ai/web-llm/-/web-llm-0.2.72.tgz#92400fb039175405f11256bc3c9cd70f243106e9"
integrity sha512-ppmyfW8HnHHZhZpi/cAbKmcbypTQeuTtev9ysppfvrKjto+8oapKZccd7Dcv/pbcJtoY2r9LzUMIXh/TcvZxZQ==
dependencies:
loglevel "^1.9.1"

Expand Down

0 comments on commit be05f98

Please sign in to comment.