From 1399bc60ec202a47af965abd567b05772d5ec504 Mon Sep 17 00:00:00 2001 From: marknguyen1302 Date: Fri, 26 Jul 2024 00:58:19 +0700 Subject: [PATCH] change cortexjs package name --- cortex-js/src/domain/models/assistant.interface.ts | 2 +- cortex-js/src/domain/models/message.interface.ts | 2 +- cortex-js/src/domain/models/model.interface.ts | 2 +- cortex-js/src/domain/models/thread.interface.ts | 2 +- cortex-js/src/infrastructure/commanders/base.command.ts | 2 +- cortex-js/src/infrastructure/commanders/benchmark.command.ts | 2 +- cortex-js/src/infrastructure/commanders/chat.command.ts | 2 +- cortex-js/src/infrastructure/commanders/embeddings.command.ts | 2 +- cortex-js/src/infrastructure/commanders/services/chat-client.ts | 2 +- .../commanders/types/benchmark-config.interface.ts | 2 +- cortex-js/src/usecases/telemetry/telemetry.usecases.ts | 2 +- cortex-js/src/utils/pull-model.ts | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cortex-js/src/domain/models/assistant.interface.ts b/cortex-js/src/domain/models/assistant.interface.ts index f0f04a0d0..d49eb1362 100644 --- a/cortex-js/src/domain/models/assistant.interface.ts +++ b/cortex-js/src/domain/models/assistant.interface.ts @@ -1,4 +1,4 @@ -import { Cortex } from 'cortexso-node'; +import { Cortex } from '@cortexso/cortex.js'; // TODO: Why we need to alias these? export interface Assistant extends Cortex.Beta.Assistant { diff --git a/cortex-js/src/domain/models/message.interface.ts b/cortex-js/src/domain/models/message.interface.ts index 12fa9293a..6cd2176a2 100644 --- a/cortex-js/src/domain/models/message.interface.ts +++ b/cortex-js/src/domain/models/message.interface.ts @@ -1,4 +1,4 @@ -import { Cortex } from 'cortexso-node'; +import { Cortex } from '@cortexso/cortex.js'; export interface Message extends Cortex.Beta.Threads.Message {} diff --git a/cortex-js/src/domain/models/model.interface.ts b/cortex-js/src/domain/models/model.interface.ts index abb380661..dac406634 100644 --- a/cortex-js/src/domain/models/model.interface.ts +++ b/cortex-js/src/domain/models/model.interface.ts @@ -1,4 +1,4 @@ -import { Cortex } from 'cortexso-node'; +import { Cortex } from '@cortexso/cortex.js'; export interface Model extends Cortex.Model, diff --git a/cortex-js/src/domain/models/thread.interface.ts b/cortex-js/src/domain/models/thread.interface.ts index b8b7aa73f..7e98a06b0 100644 --- a/cortex-js/src/domain/models/thread.interface.ts +++ b/cortex-js/src/domain/models/thread.interface.ts @@ -1,5 +1,5 @@ import { Assistant } from './assistant.interface'; -import { Cortex } from 'cortexso-node'; +import { Cortex } from '@cortexso/cortex.js'; export interface ThreadToolResources extends Cortex.Beta.Threads.Thread.ToolResources {} diff --git a/cortex-js/src/infrastructure/commanders/base.command.ts b/cortex-js/src/infrastructure/commanders/base.command.ts index 4b285218f..59354b4b4 100644 --- a/cortex-js/src/infrastructure/commanders/base.command.ts +++ b/cortex-js/src/infrastructure/commanders/base.command.ts @@ -1,7 +1,7 @@ import { CommandRunner } from 'nest-commander'; import { Injectable } from '@nestjs/common'; import { CortexUsecases } from '@/usecases/cortex/cortex.usecases'; -import Cortex from 'cortexso-node'; +import Cortex from '@cortexso/cortex.js'; import ora from 'ora'; import { FileManagerService } from '../services/file-manager/file-manager.service'; import { cortexNamespace, cortexServerAPI } from '../constants/cortex'; diff --git a/cortex-js/src/infrastructure/commanders/benchmark.command.ts b/cortex-js/src/infrastructure/commanders/benchmark.command.ts index 361579d37..447e37f03 100644 --- a/cortex-js/src/infrastructure/commanders/benchmark.command.ts +++ b/cortex-js/src/infrastructure/commanders/benchmark.command.ts @@ -15,7 +15,7 @@ import { TelemetryUsecases } from '@/usecases/telemetry/telemetry.usecases'; import { BenchmarkHardware } from '@/domain/telemetry/telemetry.interface'; import { defaultBenchmarkConfiguration } from '../constants/benchmark'; import { inspect } from 'util'; -import { Cortex } from 'cortexso-node'; +import { Cortex } from '@cortexso/cortex.js'; @SubCommand({ name: 'benchmark', diff --git a/cortex-js/src/infrastructure/commanders/chat.command.ts b/cortex-js/src/infrastructure/commanders/chat.command.ts index 25cd5a667..8128db193 100644 --- a/cortex-js/src/infrastructure/commanders/chat.command.ts +++ b/cortex-js/src/infrastructure/commanders/chat.command.ts @@ -14,7 +14,7 @@ import { Engines } from './types/engine.interface'; import { join } from 'path'; import { FileManagerService } from '../services/file-manager/file-manager.service'; import { isRemoteEngine } from '@/utils/normalize-model-id'; -import { Cortex } from 'cortexso-node'; +import { Cortex } from '@cortexso/cortex.js'; import { ChatClient } from './services/chat-client'; import { downloadModelProgress } from '@/utils/pull-model'; diff --git a/cortex-js/src/infrastructure/commanders/embeddings.command.ts b/cortex-js/src/infrastructure/commanders/embeddings.command.ts index 8dc8bf297..c15608b72 100644 --- a/cortex-js/src/infrastructure/commanders/embeddings.command.ts +++ b/cortex-js/src/infrastructure/commanders/embeddings.command.ts @@ -2,7 +2,7 @@ import { InquirerService, Option, SubCommand } from 'nest-commander'; import { inspect } from 'util'; import { CortexUsecases } from '@/usecases/cortex/cortex.usecases'; import { BaseCommand } from './base.command'; -import { Cortex } from 'cortexso-node'; +import { Cortex } from '@cortexso/cortex.js'; import ora from 'ora'; interface EmbeddingCommandOptions { diff --git a/cortex-js/src/infrastructure/commanders/services/chat-client.ts b/cortex-js/src/infrastructure/commanders/services/chat-client.ts index 27f7479d4..d6085593a 100644 --- a/cortex-js/src/infrastructure/commanders/services/chat-client.ts +++ b/cortex-js/src/infrastructure/commanders/services/chat-client.ts @@ -5,7 +5,7 @@ import { CreateThreadDto } from '@/infrastructure/dtos/threads/create-thread.dto import { CreateThreadAssistantDto } from '@/infrastructure/dtos/threads/create-thread-assistant.dto'; import { ModelParameterParser } from '@/utils/model-parameter.parser'; import { TextContentBlock } from '@/domain/models/message.interface'; -import { Cortex } from 'cortexso-node'; +import { Cortex } from '@cortexso/cortex.js'; export class ChatClient { private exitClause = 'exit()'; diff --git a/cortex-js/src/infrastructure/commanders/types/benchmark-config.interface.ts b/cortex-js/src/infrastructure/commanders/types/benchmark-config.interface.ts index 37fb34e5c..7a9bf980c 100644 --- a/cortex-js/src/infrastructure/commanders/types/benchmark-config.interface.ts +++ b/cortex-js/src/infrastructure/commanders/types/benchmark-config.interface.ts @@ -1,4 +1,4 @@ -import { Cortex } from 'cortexso-node'; +import { Cortex } from '@cortexso/cortex.js'; export interface ApiConfig { base_url: string; diff --git a/cortex-js/src/usecases/telemetry/telemetry.usecases.ts b/cortex-js/src/usecases/telemetry/telemetry.usecases.ts index cdec435f5..3db376cc8 100644 --- a/cortex-js/src/usecases/telemetry/telemetry.usecases.ts +++ b/cortex-js/src/usecases/telemetry/telemetry.usecases.ts @@ -10,7 +10,7 @@ import { } from '@/domain/telemetry/telemetry.interface'; import { ContextService } from '@/infrastructure/services/context/context.service'; import { HttpException, Inject, Injectable, Scope } from '@nestjs/common'; -import { Cortex } from 'cortexso-node'; +import { Cortex } from '@cortexso/cortex.js'; import { v4 } from 'uuid'; @Injectable({ scope: Scope.TRANSIENT }) diff --git a/cortex-js/src/utils/pull-model.ts b/cortex-js/src/utils/pull-model.ts index a083cdced..7dc6ab077 100644 --- a/cortex-js/src/utils/pull-model.ts +++ b/cortex-js/src/utils/pull-model.ts @@ -1,5 +1,5 @@ import { Presets, SingleBar } from "cli-progress"; -import { Cortex } from "cortexso-node"; +import { Cortex } from "@cortexso/cortex.js"; import { exit, stdin, stdout } from 'node:process'; export const downloadModelProgress = async (cortex: Cortex, downloadId?: string) => {