diff --git a/cortex-js/package.json b/cortex-js/package.json index 2d8080df5..c658a60c8 100644 --- a/cortex-js/package.json +++ b/cortex-js/package.json @@ -12,9 +12,9 @@ "dev": "nest dev", "build": "nest build && cpx \"cpuinfo/bin/**\" dist/bin", "build:binary": "run-script-os && cpx \"cpuinfo/bin/**\" dist/bin", - "build:binary:windows": "bun build --compile --target=bun-windows-x64 ./src/command.ts --outfile cortex.exe --external @nestjs/microservices --external @nestjs/websockets/socket-module --external class-transformer/storage", - "build:binary:linux": "bun build --compile --target=bun-linux-x64 ./src/command.ts --outfile cortex --external @nestjs/microservices --external @nestjs/websockets/socket-module --external class-transformer/storage", - "build:binary:macos": "bun build --compile --target=bun-darwin-arm64 ./src/command.ts --outfile cortex --external @nestjs/microservices --external @nestjs/websockets/socket-module --external class-transformer/storage", + "build:binary:windows": "bun build --compile --target=bun-windows-x64 ./src/command.js --outfile cortex.exe --external @nestjs/microservices --external @nestjs/websockets/socket-module --external class-transformer/storage", + "build:binary:linux": "bun build --compile --target=bun-linux-x64 ./src/command.js --outfile cortex --external @nestjs/microservices --external @nestjs/websockets/socket-module --external class-transformer/storage", + "build:binary:macos": "bun build --compile --target=bun-darwin-arm64 ./src/command.js --outfile cortex --external @nestjs/microservices --external @nestjs/websockets/socket-module --external class-transformer/storage", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "build:extensions": "run-script-os", "build:extensions:windows": "powershell -command \"$jobs = Get-ChildItem -Path './src/extensions' -Directory | ForEach-Object { Start-Job -Name ($_.Name) -ScriptBlock { param($_dir); try { Set-Location $_dir; yarn; yarn build; Write-Output 'Build successful in ' + $_dir } catch { Write-Error 'Error in ' + $_dir; throw } } -ArgumentList $_.FullName }; $jobs | Wait-Job; $jobs | ForEach-Object { Receive-Job -Job $_ -Keep } | ForEach-Object { Write-Host $_ }; $failed = $jobs | Where-Object { $_.State -ne 'Completed' -or $_.ChildJobs[0].JobStateInfo.State -ne 'Completed' }; if ($failed) { Exit 1 }\"", diff --git a/cortex-js/src/infrastructure/commanders/serve.command.ts b/cortex-js/src/infrastructure/commanders/serve.command.ts index 94a45e3f2..db142cccb 100644 --- a/cortex-js/src/infrastructure/commanders/serve.command.ts +++ b/cortex-js/src/infrastructure/commanders/serve.command.ts @@ -40,9 +40,7 @@ export class ServeCommand extends CommandRunner { ) { const serveProcess = spawn( 'node', - process.env.TEST - ? [join(__dirname, '../../../dist/src/main.js')] - : [join(__dirname, '../../main.js')], + [join(__dirname, '../../../dist/src/main.js')], { env: { ...process.env, diff --git a/cortex-js/src/infrastructure/dtos/threads/create-thread-assistant.dto.ts b/cortex-js/src/infrastructure/dtos/threads/create-thread-assistant.dto.ts index 40395f793..809133c90 100644 --- a/cortex-js/src/infrastructure/dtos/threads/create-thread-assistant.dto.ts +++ b/cortex-js/src/infrastructure/dtos/threads/create-thread-assistant.dto.ts @@ -1,6 +1,6 @@ import { IsArray, IsNumber, IsOptional, IsString } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; -import { +import type { Assistant, AssistantResponseFormatOption, AssistantToolResources,