From 51efa7a322d5f2b21ab15d5e878fd157aab97012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Musia=C5=82?= Date: Fri, 15 Mar 2024 16:09:50 +0100 Subject: [PATCH] Changed library name to @boldare/openai-assistant (#43) * refactor: renamed package name ai-assistant -> openai-assistant --- README.md | 24 +++++++++---------- apps/api/src/app/chat/agents/agents.module.ts | 2 +- .../src/app/chat/agents/get-animal.agent.ts | 2 +- apps/api/src/app/chat/chat.config.ts | 4 ++-- apps/api/src/app/chat/chat.module.ts | 2 +- apps/api/src/main.ts | 2 +- .../chat/chat-audio/chat-audio.component.ts | 2 +- .../+chat/containers/chat/chat.component.html | 12 ++++++---- .../+chat/shared/chat-client.service.ts | 2 +- .../+chat/shared/chat-files.service.ts | 2 +- .../+chat/shared/chat-gateway.service.ts | 2 +- .../app/modules/+chat/shared/chat.service.ts | 2 +- .../+chat/shared/thread-client.service.ts | 5 +++- .../modules/+chat/shared/thread.service.ts | 2 +- .../shared/configuration-form.service.ts | 2 +- .../.eslintrc.json | 0 .../jest.config.ts | 4 ++-- .../package.json | 9 +++---- .../project.json | 16 ++++++------- .../src/index.ts | 0 .../src/lib/agent/agent.base.spec.ts | 0 .../src/lib/agent/agent.base.ts | 0 .../src/lib/agent/agent.mock.ts | 0 .../src/lib/agent/agent.model.ts | 0 .../src/lib/agent/agent.module.ts | 0 .../src/lib/agent/agent.service.spec.ts | 0 .../src/lib/agent/agent.service.ts | 0 .../src/lib/agent/index.ts | 0 .../src/lib/ai/ai.controller.spec.ts | 0 .../src/lib/ai/ai.controller.ts | 0 .../src/lib/ai/ai.mock.ts | 0 .../src/lib/ai/ai.model.ts | 2 +- .../src/lib/ai/ai.module.ts | 0 .../src/lib/ai/ai.service.spec.ts | 0 .../src/lib/ai/ai.service.ts | 0 .../src/lib/ai/index.ts | 0 .../assistant/assistant-files.service.spec.ts | 0 .../lib/assistant/assistant-files.service.ts | 0 .../assistant-memory.service.spec.ts | 0 .../lib/assistant/assistant-memory.service.ts | 0 .../assistant/assistant.controller.spec.ts | 0 .../src/lib/assistant/assistant.controller.ts | 0 .../src/lib/assistant/assistant.mock.ts | 0 .../src/lib/assistant/assistant.model.ts | 0 .../src/lib/assistant/assistant.module.ts | 0 .../lib/assistant/assistant.service.spec.ts | 0 .../src/lib/assistant/assistant.service.ts | 0 .../src/lib/assistant/index.ts | 0 .../src/lib/chat/chat.controller.spec.ts | 0 .../src/lib/chat/chat.controller.ts | 0 .../src/lib/chat/chat.gateway.spec.ts | 0 .../src/lib/chat/chat.gateway.ts | 0 .../src/lib/chat/chat.helpers.spec.ts | 0 .../src/lib/chat/chat.helpers.ts | 0 .../src/lib/chat/chat.model.ts | 0 .../src/lib/chat/chat.module.ts | 0 .../src/lib/chat/chat.service.spec.ts | 0 .../src/lib/chat/chat.service.ts | 0 .../src/lib/chat/index.ts | 0 .../src/lib/config/config.module.ts | 0 .../src/lib/config/config.service.spec.ts | 0 .../src/lib/config/config.service.ts | 0 .../src/lib/config/index.ts | 0 .../src/lib/files/files.controller.spec.ts | 0 .../src/lib/files/files.controller.ts | 0 .../src/lib/files/files.model.ts | 0 .../src/lib/files/files.module.ts | 0 .../src/lib/files/files.service.spec.ts | 0 .../src/lib/files/files.service.ts | 0 .../src/lib/files/index.ts | 0 .../src/lib/run/index.ts | 0 .../src/lib/run/run.module.ts | 0 .../src/lib/run/run.service.spec.ts | 0 .../src/lib/run/run.service.ts | 0 .../src/lib/threads/index.ts | 0 .../lib/threads/threads.controller.spec.ts | 0 .../src/lib/threads/threads.controller.ts | 0 .../src/lib/threads/threads.model.ts | 0 .../src/lib/threads/threads.module.ts | 0 .../src/lib/threads/threads.service.spec.ts | 0 .../src/lib/threads/threads.service.ts | 0 .../tsconfig.json | 0 .../tsconfig.lib.json | 0 .../tsconfig.spec.json | 0 package.json | 8 +++---- tsconfig.base.json | 4 ++-- 86 files changed, 59 insertions(+), 51 deletions(-) rename libs/{ai-assistant => openai-assistant}/.eslintrc.json (100%) rename libs/{ai-assistant => openai-assistant}/jest.config.ts (70%) rename libs/{ai-assistant => openai-assistant}/package.json (72%) rename libs/{ai-assistant => openai-assistant}/project.json (60%) rename libs/{ai-assistant => openai-assistant}/src/index.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/agent/agent.base.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/agent/agent.base.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/agent/agent.mock.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/agent/agent.model.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/agent/agent.module.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/agent/agent.service.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/agent/agent.service.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/agent/index.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/ai/ai.controller.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/ai/ai.controller.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/ai/ai.mock.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/ai/ai.model.ts (94%) rename libs/{ai-assistant => openai-assistant}/src/lib/ai/ai.module.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/ai/ai.service.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/ai/ai.service.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/ai/index.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/assistant/assistant-files.service.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/assistant/assistant-files.service.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/assistant/assistant-memory.service.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/assistant/assistant-memory.service.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/assistant/assistant.controller.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/assistant/assistant.controller.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/assistant/assistant.mock.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/assistant/assistant.model.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/assistant/assistant.module.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/assistant/assistant.service.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/assistant/assistant.service.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/assistant/index.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/chat/chat.controller.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/chat/chat.controller.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/chat/chat.gateway.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/chat/chat.gateway.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/chat/chat.helpers.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/chat/chat.helpers.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/chat/chat.model.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/chat/chat.module.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/chat/chat.service.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/chat/chat.service.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/chat/index.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/config/config.module.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/config/config.service.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/config/config.service.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/config/index.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/files/files.controller.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/files/files.controller.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/files/files.model.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/files/files.module.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/files/files.service.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/files/files.service.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/files/index.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/run/index.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/run/run.module.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/run/run.service.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/run/run.service.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/threads/index.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/threads/threads.controller.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/threads/threads.controller.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/threads/threads.model.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/threads/threads.module.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/threads/threads.service.spec.ts (100%) rename libs/{ai-assistant => openai-assistant}/src/lib/threads/threads.service.ts (100%) rename libs/{ai-assistant => openai-assistant}/tsconfig.json (100%) rename libs/{ai-assistant => openai-assistant}/tsconfig.lib.json (100%) rename libs/{ai-assistant => openai-assistant}/tsconfig.spec.json (100%) diff --git a/README.md b/README.md index dec8659..4aeba56 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@

demo 🔹 api docs 🔹 - npm 🔹 - github + npm 🔹 + github

# 🤖 AI Assistant @@ -50,7 +50,7 @@ nest new project-name Install the library using npm: ```bash -npm i @boldare/ai-assistant --save +npm i @boldare/openai-assistant --save ``` ### Step 2: Env variables @@ -111,7 +111,7 @@ Import the AI Assistant module with your configuration into the module file wher export class ChatbotModule {} ``` -Automatically, the library will add WebSockets ([chat.gateway.ts](libs/ai-assistant/src/lib/chat/chat.gateway.ts)) and a [REST API](https://assistant.ai.boldare.dev/api/docs) for the assistant. The WebSocket server will be available at the `/` endpoint, and the [REST API](https://assistant.ai.boldare.dev/api/docs) will be available at the `/api` endpoint (depending on the API prefix). +Automatically, the library will add WebSockets ([chat.gateway.ts](libs/openai-assistant/src/lib/chat/chat.gateway.ts)) and a [REST API](https://assistant.ai.boldare.dev/api/docs) for the assistant. The WebSocket server will be available at the `/` endpoint, and the [REST API](https://assistant.ai.boldare.dev/api/docs) will be available at the `/api` endpoint (depending on the API prefix). #### Websockets events @@ -170,7 +170,7 @@ Import the service into the module file where you intend to use it: ```js import { Module } from '@nestjs/common'; -import { AgentModule } from '@boldare/ai-assistant'; +import { AgentModule } from '@boldare/openai-assistant'; import { GetNicknameAgent } from './get-nickname.agent'; @Module({ @@ -195,12 +195,12 @@ export class ChatModule {} The repository includes a library with an AI assistant as well as other useful parts: -| Name | Description | More | -|-------------------------|---------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------| -| `@boldare/ai-assistant` | A NestJS library based on the OpenAI Assistant for building efficient, scalable, and quick solutions for AI assistants/chatbots | [Documentation](https://github.com/boldare/ai-assistant/wiki/%F0%9F%A4%96-AI-Assistant) | -| `@boldare/ai-embedded` | The code enables embedding the chatbot on various websites through JavaScript scripts. | [Documentation](https://github.com/boldare/ai-assistant/wiki/%F0%9F%96%87-Integrating-Chatbot-into-Your-Website) | -| `api` | Example usage of the `@boldare/ai-assistant` library. | [Documentation](https://github.com/boldare/ai-assistant/wiki/%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-Repository) | -| `spa` | Example client application (SPA) with a chatbot. | [Documenation](https://github.com/boldare/ai-assistant/wiki/%F0%9F%92%AC-Chatbot-%E2%80%90-Client-application) | +| Name | Description | More | +|-------------------------|---------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------| +| `@boldare/openai-assistant` | A NestJS library based on the OpenAI Assistant for building efficient, scalable, and quick solutions for AI assistants/chatbots | [Documentation](https://github.com/boldare/openai-assistant/wiki/%F0%9F%A4%96-AI-Assistant) | +| `@boldare/ai-embedded` | The code enables embedding the chatbot on various websites through JavaScript scripts. | [Documentation](https://github.com/boldare/openai-assistant/wiki/%F0%9F%96%87-Integrating-Chatbot-into-Your-Website) | +| `api` | Example usage of the `@boldare/openai-assistant` library. | [Documentation](https://github.com/boldare/openai-assistant/wiki/%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-Repository) | +| `spa` | Example client application (SPA) with a chatbot. | [Documenation](https://github.com/boldare/openai-assistant/wiki/%F0%9F%92%AC-Chatbot-%E2%80%90-Client-application) | ## Getting started @@ -244,4 +244,4 @@ Now you can open your browser and navigate to: # License -`@boldare/ai-assistant` is MIT licensed +`@boldare/openai-assistant` is MIT licensed diff --git a/apps/api/src/app/chat/agents/agents.module.ts b/apps/api/src/app/chat/agents/agents.module.ts index fd20cb5..32e62ef 100644 --- a/apps/api/src/app/chat/agents/agents.module.ts +++ b/apps/api/src/app/chat/agents/agents.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { GetAnimalAgent } from './get-animal.agent'; -import { AgentModule } from '@boldare/ai-assistant'; +import { AgentModule } from '@boldare/openai-assistant'; @Module({ imports: [AgentModule], diff --git a/apps/api/src/app/chat/agents/get-animal.agent.ts b/apps/api/src/app/chat/agents/get-animal.agent.ts index abb2a4c..7ab3bc2 100644 --- a/apps/api/src/app/chat/agents/get-animal.agent.ts +++ b/apps/api/src/app/chat/agents/get-animal.agent.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { AssistantCreateParams } from 'openai/resources/beta'; -import { AgentBase, AgentData, AgentService } from '@boldare/ai-assistant'; +import { AgentBase, AgentData, AgentService } from '@boldare/openai-assistant'; @Injectable() export class GetAnimalAgent extends AgentBase { diff --git a/apps/api/src/app/chat/chat.config.ts b/apps/api/src/app/chat/chat.config.ts index 28223b5..719c0bc 100644 --- a/apps/api/src/app/chat/chat.config.ts +++ b/apps/api/src/app/chat/chat.config.ts @@ -1,9 +1,9 @@ import { AssistantCreateParams } from 'openai/resources/beta'; -import { AssistantConfigParams } from '@boldare/ai-assistant'; +import { AssistantConfigParams } from '@boldare/openai-assistant'; import 'dotenv/config'; export const assistantParams: AssistantCreateParams = { - name: '@boldare/ai-assistant', + name: '@boldare/openai-assistant', instructions: `You are a chatbot assistant. Use the general knowledge to answer questions. Speak briefly and clearly.`, tools: [{ type: 'code_interpreter' }, { type: 'retrieval' }], model: 'gpt-4-1106-preview', diff --git a/apps/api/src/app/chat/chat.module.ts b/apps/api/src/app/chat/chat.module.ts index 512a1d7..5358d5c 100644 --- a/apps/api/src/app/chat/chat.module.ts +++ b/apps/api/src/app/chat/chat.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { AssistantModule } from '@boldare/ai-assistant'; +import { AssistantModule } from '@boldare/openai-assistant'; import { assistantConfig } from './chat.config'; import { AgentsModule } from './agents/agents.module'; diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index a31c76d..bfddc7f 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -8,7 +8,7 @@ async function bootstrap() { const app = await NestFactory.create(AppModule); const globalPrefix = 'api'; const config = new DocumentBuilder() - .setTitle('@boldare/ai-assistant') + .setTitle('@boldare/openai-assistant') .setVersion('0.1.0') .build(); const document = SwaggerModule.createDocument(app, config); diff --git a/apps/spa/src/app/components/chat/chat-audio/chat-audio.component.ts b/apps/spa/src/app/components/chat/chat-audio/chat-audio.component.ts index cf783a3..6af50a5 100644 --- a/apps/spa/src/app/components/chat/chat-audio/chat-audio.component.ts +++ b/apps/spa/src/app/components/chat/chat-audio/chat-audio.component.ts @@ -4,7 +4,7 @@ import { Message, SpeechVoice } from '../../../modules/+chat/shared/chat.model'; import { environment } from '../../../../environments/environment'; import { MatIconModule } from '@angular/material/icon'; import { delay } from 'rxjs'; -import { ChatAudioResponse, PostSpeechDto } from '@boldare/ai-assistant'; +import { ChatAudioResponse, PostSpeechDto } from '@boldare/openai-assistant'; import { NgClass } from '@angular/common'; @Component({ diff --git a/apps/spa/src/app/modules/+chat/containers/chat/chat.component.html b/apps/spa/src/app/modules/+chat/containers/chat/chat.component.html index 7809ed1..946d37c 100644 --- a/apps/spa/src/app/modules/+chat/containers/chat/chat.component.html +++ b/apps/spa/src/app/modules/+chat/containers/chat/chat.component.html @@ -1,8 +1,12 @@ - +
Documentation @@ -16,14 +20,14 @@ 🔹 GitHub 🔹 NPM diff --git a/apps/spa/src/app/modules/+chat/shared/chat-client.service.ts b/apps/spa/src/app/modules/+chat/shared/chat-client.service.ts index b8328b2..405ba4a 100644 --- a/apps/spa/src/app/modules/+chat/shared/chat-client.service.ts +++ b/apps/spa/src/app/modules/+chat/shared/chat-client.service.ts @@ -9,7 +9,7 @@ import { PostSpeechDto, UploadFilesPayload, UploadFilesResponseDto, -} from '@boldare/ai-assistant'; +} from '@boldare/openai-assistant'; @Injectable({ providedIn: 'root' }) export class ChatClientService { diff --git a/apps/spa/src/app/modules/+chat/shared/chat-files.service.ts b/apps/spa/src/app/modules/+chat/shared/chat-files.service.ts index 79c847b..73409ae 100644 --- a/apps/spa/src/app/modules/+chat/shared/chat-files.service.ts +++ b/apps/spa/src/app/modules/+chat/shared/chat-files.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { FilesService } from '../../../components/controls'; import { ChatClientService } from './chat-client.service'; -import { OpenAiFile } from '@boldare/ai-assistant'; +import { OpenAiFile } from '@boldare/openai-assistant'; @Injectable({ providedIn: 'root' }) export class ChatFilesService { diff --git a/apps/spa/src/app/modules/+chat/shared/chat-gateway.service.ts b/apps/spa/src/app/modules/+chat/shared/chat-gateway.service.ts index fd9d6b1..6e95beb 100644 --- a/apps/spa/src/app/modules/+chat/shared/chat-gateway.service.ts +++ b/apps/spa/src/app/modules/+chat/shared/chat-gateway.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { ChatEvents } from './chat.model'; import io from 'socket.io-client'; -import { ChatCallDto } from '@boldare/ai-assistant'; +import { ChatCallDto } from '@boldare/openai-assistant'; import { Observable } from 'rxjs'; import { environment } from '../../../../environments/environment'; diff --git a/apps/spa/src/app/modules/+chat/shared/chat.service.ts b/apps/spa/src/app/modules/+chat/shared/chat.service.ts index 24a6ea4..cf2b018 100644 --- a/apps/spa/src/app/modules/+chat/shared/chat.service.ts +++ b/apps/spa/src/app/modules/+chat/shared/chat.service.ts @@ -15,7 +15,7 @@ import { ChatClientService } from './chat-client.service'; import { ThreadService } from './thread.service'; import { ChatFilesService } from './chat-files.service'; import { environment } from '../../../../environments/environment'; -import { OpenAiFile, GetThreadResponseDto } from '@boldare/ai-assistant'; +import { OpenAiFile, GetThreadResponseDto } from '@boldare/openai-assistant'; import { Threads } from 'openai/resources/beta'; import MessageContentText = Threads.MessageContentText; import { ThreadMessage } from 'openai/resources/beta/threads'; diff --git a/apps/spa/src/app/modules/+chat/shared/thread-client.service.ts b/apps/spa/src/app/modules/+chat/shared/thread-client.service.ts index 0a7c04f..c4bbf37 100644 --- a/apps/spa/src/app/modules/+chat/shared/thread-client.service.ts +++ b/apps/spa/src/app/modules/+chat/shared/thread-client.service.ts @@ -1,6 +1,9 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; -import { CreateThreadDto, GetThreadResponseDto } from '@boldare/ai-assistant'; +import { + CreateThreadDto, + GetThreadResponseDto, +} from '@boldare/openai-assistant'; import { Observable } from 'rxjs'; import { environment } from '../../../../environments/environment'; diff --git a/apps/spa/src/app/modules/+chat/shared/thread.service.ts b/apps/spa/src/app/modules/+chat/shared/thread.service.ts index 89d1b34..898034e 100644 --- a/apps/spa/src/app/modules/+chat/shared/thread.service.ts +++ b/apps/spa/src/app/modules/+chat/shared/thread.service.ts @@ -3,7 +3,7 @@ import { BehaviorSubject, Observable, Subject, take, tap } from 'rxjs'; import { environment } from '../../../../environments/environment'; import { ThreadClientService } from './thread-client.service'; import { ConfigurationFormService } from '../../+configuration/shared/configuration-form.service'; -import { GetThreadResponseDto } from '@boldare/ai-assistant'; +import { GetThreadResponseDto } from '@boldare/openai-assistant'; @Injectable({ providedIn: 'root' }) export class ThreadService { diff --git a/apps/spa/src/app/modules/+configuration/shared/configuration-form.service.ts b/apps/spa/src/app/modules/+configuration/shared/configuration-form.service.ts index 797df27..c7040c3 100644 --- a/apps/spa/src/app/modules/+configuration/shared/configuration-form.service.ts +++ b/apps/spa/src/app/modules/+configuration/shared/configuration-form.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; import { FormControl, FormGroup } from '@angular/forms'; -import { CreateThreadDto } from '@boldare/ai-assistant'; +import { CreateThreadDto } from '@boldare/openai-assistant'; import { ConfigurationForm } from './configuration.model'; import { MessageStatus, SpeechVoice } from '../../+chat/shared/chat.model'; diff --git a/libs/ai-assistant/.eslintrc.json b/libs/openai-assistant/.eslintrc.json similarity index 100% rename from libs/ai-assistant/.eslintrc.json rename to libs/openai-assistant/.eslintrc.json diff --git a/libs/ai-assistant/jest.config.ts b/libs/openai-assistant/jest.config.ts similarity index 70% rename from libs/ai-assistant/jest.config.ts rename to libs/openai-assistant/jest.config.ts index 03d8fdb..a66fe2d 100644 --- a/libs/ai-assistant/jest.config.ts +++ b/libs/openai-assistant/jest.config.ts @@ -1,10 +1,10 @@ export default { - displayName: 'ai-assistant', + displayName: 'openai-assistant', preset: '../../jest.preset.js', testEnvironment: 'node', transform: { '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], }, moduleFileExtensions: ['ts', 'js', 'html'], - coverageDirectory: '../../coverage/libs/ai-assistant', + coverageDirectory: '../../coverage/libs/openai-assistant', }; diff --git a/libs/ai-assistant/package.json b/libs/openai-assistant/package.json similarity index 72% rename from libs/ai-assistant/package.json rename to libs/openai-assistant/package.json index 870716d..dc6f052 100644 --- a/libs/ai-assistant/package.json +++ b/libs/openai-assistant/package.json @@ -1,6 +1,7 @@ { - "name": "@boldare/ai-assistant", - "version": "0.0.2-dev.6", + "name": "@boldare/openai-assistant", + "description": "NestJS library for building chatbot solutions based on the OpenAI Assistant API", + "version": "0.0.1-dev.1", "private": false, "dependencies": { "tslib": "^2.3.0", @@ -18,7 +19,7 @@ "type": "commonjs", "main": "./src/index.js", "typings": "./src/index.d.ts", - "homepage": "https://github.com/boldare/ai-assistant", + "homepage": "https://github.com/boldare/openai-assistant", "keywords": [ "ai", "assistant", @@ -38,6 +39,6 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/boldare/ai-assistant.git" + "url": "git+https://github.com/boldare/openai-assistant.git" } } diff --git a/libs/ai-assistant/project.json b/libs/openai-assistant/project.json similarity index 60% rename from libs/ai-assistant/project.json rename to libs/openai-assistant/project.json index a44535c..fe2760e 100644 --- a/libs/ai-assistant/project.json +++ b/libs/openai-assistant/project.json @@ -1,18 +1,18 @@ { - "name": "ai-assistant", + "name": "openai-assistant", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/ai-assistant/src", + "sourceRoot": "libs/openai-assistant/src", "projectType": "library", "targets": { "build": { "executor": "@nx/js:tsc", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/libs/ai-assistant", - "tsConfig": "libs/ai-assistant/tsconfig.lib.json", - "packageJson": "libs/ai-assistant/package.json", - "main": "libs/ai-assistant/src/index.ts", - "assets": ["libs/ai-assistant/*.md"] + "outputPath": "dist/libs/openai-assistant", + "tsConfig": "libs/openai-assistant/tsconfig.lib.json", + "packageJson": "libs/openai-assistant/package.json", + "main": "libs/openai-assistant/src/index.ts", + "assets": ["libs/openai-assistant/*.md"] } }, "publish": { @@ -27,7 +27,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "libs/ai-assistant/jest.config.ts" + "jestConfig": "libs/openai-assistant/jest.config.ts" } } }, diff --git a/libs/ai-assistant/src/index.ts b/libs/openai-assistant/src/index.ts similarity index 100% rename from libs/ai-assistant/src/index.ts rename to libs/openai-assistant/src/index.ts diff --git a/libs/ai-assistant/src/lib/agent/agent.base.spec.ts b/libs/openai-assistant/src/lib/agent/agent.base.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/agent/agent.base.spec.ts rename to libs/openai-assistant/src/lib/agent/agent.base.spec.ts diff --git a/libs/ai-assistant/src/lib/agent/agent.base.ts b/libs/openai-assistant/src/lib/agent/agent.base.ts similarity index 100% rename from libs/ai-assistant/src/lib/agent/agent.base.ts rename to libs/openai-assistant/src/lib/agent/agent.base.ts diff --git a/libs/ai-assistant/src/lib/agent/agent.mock.ts b/libs/openai-assistant/src/lib/agent/agent.mock.ts similarity index 100% rename from libs/ai-assistant/src/lib/agent/agent.mock.ts rename to libs/openai-assistant/src/lib/agent/agent.mock.ts diff --git a/libs/ai-assistant/src/lib/agent/agent.model.ts b/libs/openai-assistant/src/lib/agent/agent.model.ts similarity index 100% rename from libs/ai-assistant/src/lib/agent/agent.model.ts rename to libs/openai-assistant/src/lib/agent/agent.model.ts diff --git a/libs/ai-assistant/src/lib/agent/agent.module.ts b/libs/openai-assistant/src/lib/agent/agent.module.ts similarity index 100% rename from libs/ai-assistant/src/lib/agent/agent.module.ts rename to libs/openai-assistant/src/lib/agent/agent.module.ts diff --git a/libs/ai-assistant/src/lib/agent/agent.service.spec.ts b/libs/openai-assistant/src/lib/agent/agent.service.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/agent/agent.service.spec.ts rename to libs/openai-assistant/src/lib/agent/agent.service.spec.ts diff --git a/libs/ai-assistant/src/lib/agent/agent.service.ts b/libs/openai-assistant/src/lib/agent/agent.service.ts similarity index 100% rename from libs/ai-assistant/src/lib/agent/agent.service.ts rename to libs/openai-assistant/src/lib/agent/agent.service.ts diff --git a/libs/ai-assistant/src/lib/agent/index.ts b/libs/openai-assistant/src/lib/agent/index.ts similarity index 100% rename from libs/ai-assistant/src/lib/agent/index.ts rename to libs/openai-assistant/src/lib/agent/index.ts diff --git a/libs/ai-assistant/src/lib/ai/ai.controller.spec.ts b/libs/openai-assistant/src/lib/ai/ai.controller.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/ai/ai.controller.spec.ts rename to libs/openai-assistant/src/lib/ai/ai.controller.spec.ts diff --git a/libs/ai-assistant/src/lib/ai/ai.controller.ts b/libs/openai-assistant/src/lib/ai/ai.controller.ts similarity index 100% rename from libs/ai-assistant/src/lib/ai/ai.controller.ts rename to libs/openai-assistant/src/lib/ai/ai.controller.ts diff --git a/libs/ai-assistant/src/lib/ai/ai.mock.ts b/libs/openai-assistant/src/lib/ai/ai.mock.ts similarity index 100% rename from libs/ai-assistant/src/lib/ai/ai.mock.ts rename to libs/openai-assistant/src/lib/ai/ai.mock.ts diff --git a/libs/ai-assistant/src/lib/ai/ai.model.ts b/libs/openai-assistant/src/lib/ai/ai.model.ts similarity index 94% rename from libs/ai-assistant/src/lib/ai/ai.model.ts rename to libs/openai-assistant/src/lib/ai/ai.model.ts index 3c44727..bac442e 100644 --- a/libs/ai-assistant/src/lib/ai/ai.model.ts +++ b/libs/openai-assistant/src/lib/ai/ai.model.ts @@ -31,7 +31,7 @@ export class PostSpeechResponseDto { } export class PostTranscriptionDto { - @ApiProperty({type: 'string', format: 'binary'}) + @ApiProperty({ type: 'string', format: 'binary' }) file!: File; } diff --git a/libs/ai-assistant/src/lib/ai/ai.module.ts b/libs/openai-assistant/src/lib/ai/ai.module.ts similarity index 100% rename from libs/ai-assistant/src/lib/ai/ai.module.ts rename to libs/openai-assistant/src/lib/ai/ai.module.ts diff --git a/libs/ai-assistant/src/lib/ai/ai.service.spec.ts b/libs/openai-assistant/src/lib/ai/ai.service.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/ai/ai.service.spec.ts rename to libs/openai-assistant/src/lib/ai/ai.service.spec.ts diff --git a/libs/ai-assistant/src/lib/ai/ai.service.ts b/libs/openai-assistant/src/lib/ai/ai.service.ts similarity index 100% rename from libs/ai-assistant/src/lib/ai/ai.service.ts rename to libs/openai-assistant/src/lib/ai/ai.service.ts diff --git a/libs/ai-assistant/src/lib/ai/index.ts b/libs/openai-assistant/src/lib/ai/index.ts similarity index 100% rename from libs/ai-assistant/src/lib/ai/index.ts rename to libs/openai-assistant/src/lib/ai/index.ts diff --git a/libs/ai-assistant/src/lib/assistant/assistant-files.service.spec.ts b/libs/openai-assistant/src/lib/assistant/assistant-files.service.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/assistant/assistant-files.service.spec.ts rename to libs/openai-assistant/src/lib/assistant/assistant-files.service.spec.ts diff --git a/libs/ai-assistant/src/lib/assistant/assistant-files.service.ts b/libs/openai-assistant/src/lib/assistant/assistant-files.service.ts similarity index 100% rename from libs/ai-assistant/src/lib/assistant/assistant-files.service.ts rename to libs/openai-assistant/src/lib/assistant/assistant-files.service.ts diff --git a/libs/ai-assistant/src/lib/assistant/assistant-memory.service.spec.ts b/libs/openai-assistant/src/lib/assistant/assistant-memory.service.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/assistant/assistant-memory.service.spec.ts rename to libs/openai-assistant/src/lib/assistant/assistant-memory.service.spec.ts diff --git a/libs/ai-assistant/src/lib/assistant/assistant-memory.service.ts b/libs/openai-assistant/src/lib/assistant/assistant-memory.service.ts similarity index 100% rename from libs/ai-assistant/src/lib/assistant/assistant-memory.service.ts rename to libs/openai-assistant/src/lib/assistant/assistant-memory.service.ts diff --git a/libs/ai-assistant/src/lib/assistant/assistant.controller.spec.ts b/libs/openai-assistant/src/lib/assistant/assistant.controller.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/assistant/assistant.controller.spec.ts rename to libs/openai-assistant/src/lib/assistant/assistant.controller.spec.ts diff --git a/libs/ai-assistant/src/lib/assistant/assistant.controller.ts b/libs/openai-assistant/src/lib/assistant/assistant.controller.ts similarity index 100% rename from libs/ai-assistant/src/lib/assistant/assistant.controller.ts rename to libs/openai-assistant/src/lib/assistant/assistant.controller.ts diff --git a/libs/ai-assistant/src/lib/assistant/assistant.mock.ts b/libs/openai-assistant/src/lib/assistant/assistant.mock.ts similarity index 100% rename from libs/ai-assistant/src/lib/assistant/assistant.mock.ts rename to libs/openai-assistant/src/lib/assistant/assistant.mock.ts diff --git a/libs/ai-assistant/src/lib/assistant/assistant.model.ts b/libs/openai-assistant/src/lib/assistant/assistant.model.ts similarity index 100% rename from libs/ai-assistant/src/lib/assistant/assistant.model.ts rename to libs/openai-assistant/src/lib/assistant/assistant.model.ts diff --git a/libs/ai-assistant/src/lib/assistant/assistant.module.ts b/libs/openai-assistant/src/lib/assistant/assistant.module.ts similarity index 100% rename from libs/ai-assistant/src/lib/assistant/assistant.module.ts rename to libs/openai-assistant/src/lib/assistant/assistant.module.ts diff --git a/libs/ai-assistant/src/lib/assistant/assistant.service.spec.ts b/libs/openai-assistant/src/lib/assistant/assistant.service.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/assistant/assistant.service.spec.ts rename to libs/openai-assistant/src/lib/assistant/assistant.service.spec.ts diff --git a/libs/ai-assistant/src/lib/assistant/assistant.service.ts b/libs/openai-assistant/src/lib/assistant/assistant.service.ts similarity index 100% rename from libs/ai-assistant/src/lib/assistant/assistant.service.ts rename to libs/openai-assistant/src/lib/assistant/assistant.service.ts diff --git a/libs/ai-assistant/src/lib/assistant/index.ts b/libs/openai-assistant/src/lib/assistant/index.ts similarity index 100% rename from libs/ai-assistant/src/lib/assistant/index.ts rename to libs/openai-assistant/src/lib/assistant/index.ts diff --git a/libs/ai-assistant/src/lib/chat/chat.controller.spec.ts b/libs/openai-assistant/src/lib/chat/chat.controller.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/chat/chat.controller.spec.ts rename to libs/openai-assistant/src/lib/chat/chat.controller.spec.ts diff --git a/libs/ai-assistant/src/lib/chat/chat.controller.ts b/libs/openai-assistant/src/lib/chat/chat.controller.ts similarity index 100% rename from libs/ai-assistant/src/lib/chat/chat.controller.ts rename to libs/openai-assistant/src/lib/chat/chat.controller.ts diff --git a/libs/ai-assistant/src/lib/chat/chat.gateway.spec.ts b/libs/openai-assistant/src/lib/chat/chat.gateway.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/chat/chat.gateway.spec.ts rename to libs/openai-assistant/src/lib/chat/chat.gateway.spec.ts diff --git a/libs/ai-assistant/src/lib/chat/chat.gateway.ts b/libs/openai-assistant/src/lib/chat/chat.gateway.ts similarity index 100% rename from libs/ai-assistant/src/lib/chat/chat.gateway.ts rename to libs/openai-assistant/src/lib/chat/chat.gateway.ts diff --git a/libs/ai-assistant/src/lib/chat/chat.helpers.spec.ts b/libs/openai-assistant/src/lib/chat/chat.helpers.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/chat/chat.helpers.spec.ts rename to libs/openai-assistant/src/lib/chat/chat.helpers.spec.ts diff --git a/libs/ai-assistant/src/lib/chat/chat.helpers.ts b/libs/openai-assistant/src/lib/chat/chat.helpers.ts similarity index 100% rename from libs/ai-assistant/src/lib/chat/chat.helpers.ts rename to libs/openai-assistant/src/lib/chat/chat.helpers.ts diff --git a/libs/ai-assistant/src/lib/chat/chat.model.ts b/libs/openai-assistant/src/lib/chat/chat.model.ts similarity index 100% rename from libs/ai-assistant/src/lib/chat/chat.model.ts rename to libs/openai-assistant/src/lib/chat/chat.model.ts diff --git a/libs/ai-assistant/src/lib/chat/chat.module.ts b/libs/openai-assistant/src/lib/chat/chat.module.ts similarity index 100% rename from libs/ai-assistant/src/lib/chat/chat.module.ts rename to libs/openai-assistant/src/lib/chat/chat.module.ts diff --git a/libs/ai-assistant/src/lib/chat/chat.service.spec.ts b/libs/openai-assistant/src/lib/chat/chat.service.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/chat/chat.service.spec.ts rename to libs/openai-assistant/src/lib/chat/chat.service.spec.ts diff --git a/libs/ai-assistant/src/lib/chat/chat.service.ts b/libs/openai-assistant/src/lib/chat/chat.service.ts similarity index 100% rename from libs/ai-assistant/src/lib/chat/chat.service.ts rename to libs/openai-assistant/src/lib/chat/chat.service.ts diff --git a/libs/ai-assistant/src/lib/chat/index.ts b/libs/openai-assistant/src/lib/chat/index.ts similarity index 100% rename from libs/ai-assistant/src/lib/chat/index.ts rename to libs/openai-assistant/src/lib/chat/index.ts diff --git a/libs/ai-assistant/src/lib/config/config.module.ts b/libs/openai-assistant/src/lib/config/config.module.ts similarity index 100% rename from libs/ai-assistant/src/lib/config/config.module.ts rename to libs/openai-assistant/src/lib/config/config.module.ts diff --git a/libs/ai-assistant/src/lib/config/config.service.spec.ts b/libs/openai-assistant/src/lib/config/config.service.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/config/config.service.spec.ts rename to libs/openai-assistant/src/lib/config/config.service.spec.ts diff --git a/libs/ai-assistant/src/lib/config/config.service.ts b/libs/openai-assistant/src/lib/config/config.service.ts similarity index 100% rename from libs/ai-assistant/src/lib/config/config.service.ts rename to libs/openai-assistant/src/lib/config/config.service.ts diff --git a/libs/ai-assistant/src/lib/config/index.ts b/libs/openai-assistant/src/lib/config/index.ts similarity index 100% rename from libs/ai-assistant/src/lib/config/index.ts rename to libs/openai-assistant/src/lib/config/index.ts diff --git a/libs/ai-assistant/src/lib/files/files.controller.spec.ts b/libs/openai-assistant/src/lib/files/files.controller.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/files/files.controller.spec.ts rename to libs/openai-assistant/src/lib/files/files.controller.spec.ts diff --git a/libs/ai-assistant/src/lib/files/files.controller.ts b/libs/openai-assistant/src/lib/files/files.controller.ts similarity index 100% rename from libs/ai-assistant/src/lib/files/files.controller.ts rename to libs/openai-assistant/src/lib/files/files.controller.ts diff --git a/libs/ai-assistant/src/lib/files/files.model.ts b/libs/openai-assistant/src/lib/files/files.model.ts similarity index 100% rename from libs/ai-assistant/src/lib/files/files.model.ts rename to libs/openai-assistant/src/lib/files/files.model.ts diff --git a/libs/ai-assistant/src/lib/files/files.module.ts b/libs/openai-assistant/src/lib/files/files.module.ts similarity index 100% rename from libs/ai-assistant/src/lib/files/files.module.ts rename to libs/openai-assistant/src/lib/files/files.module.ts diff --git a/libs/ai-assistant/src/lib/files/files.service.spec.ts b/libs/openai-assistant/src/lib/files/files.service.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/files/files.service.spec.ts rename to libs/openai-assistant/src/lib/files/files.service.spec.ts diff --git a/libs/ai-assistant/src/lib/files/files.service.ts b/libs/openai-assistant/src/lib/files/files.service.ts similarity index 100% rename from libs/ai-assistant/src/lib/files/files.service.ts rename to libs/openai-assistant/src/lib/files/files.service.ts diff --git a/libs/ai-assistant/src/lib/files/index.ts b/libs/openai-assistant/src/lib/files/index.ts similarity index 100% rename from libs/ai-assistant/src/lib/files/index.ts rename to libs/openai-assistant/src/lib/files/index.ts diff --git a/libs/ai-assistant/src/lib/run/index.ts b/libs/openai-assistant/src/lib/run/index.ts similarity index 100% rename from libs/ai-assistant/src/lib/run/index.ts rename to libs/openai-assistant/src/lib/run/index.ts diff --git a/libs/ai-assistant/src/lib/run/run.module.ts b/libs/openai-assistant/src/lib/run/run.module.ts similarity index 100% rename from libs/ai-assistant/src/lib/run/run.module.ts rename to libs/openai-assistant/src/lib/run/run.module.ts diff --git a/libs/ai-assistant/src/lib/run/run.service.spec.ts b/libs/openai-assistant/src/lib/run/run.service.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/run/run.service.spec.ts rename to libs/openai-assistant/src/lib/run/run.service.spec.ts diff --git a/libs/ai-assistant/src/lib/run/run.service.ts b/libs/openai-assistant/src/lib/run/run.service.ts similarity index 100% rename from libs/ai-assistant/src/lib/run/run.service.ts rename to libs/openai-assistant/src/lib/run/run.service.ts diff --git a/libs/ai-assistant/src/lib/threads/index.ts b/libs/openai-assistant/src/lib/threads/index.ts similarity index 100% rename from libs/ai-assistant/src/lib/threads/index.ts rename to libs/openai-assistant/src/lib/threads/index.ts diff --git a/libs/ai-assistant/src/lib/threads/threads.controller.spec.ts b/libs/openai-assistant/src/lib/threads/threads.controller.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/threads/threads.controller.spec.ts rename to libs/openai-assistant/src/lib/threads/threads.controller.spec.ts diff --git a/libs/ai-assistant/src/lib/threads/threads.controller.ts b/libs/openai-assistant/src/lib/threads/threads.controller.ts similarity index 100% rename from libs/ai-assistant/src/lib/threads/threads.controller.ts rename to libs/openai-assistant/src/lib/threads/threads.controller.ts diff --git a/libs/ai-assistant/src/lib/threads/threads.model.ts b/libs/openai-assistant/src/lib/threads/threads.model.ts similarity index 100% rename from libs/ai-assistant/src/lib/threads/threads.model.ts rename to libs/openai-assistant/src/lib/threads/threads.model.ts diff --git a/libs/ai-assistant/src/lib/threads/threads.module.ts b/libs/openai-assistant/src/lib/threads/threads.module.ts similarity index 100% rename from libs/ai-assistant/src/lib/threads/threads.module.ts rename to libs/openai-assistant/src/lib/threads/threads.module.ts diff --git a/libs/ai-assistant/src/lib/threads/threads.service.spec.ts b/libs/openai-assistant/src/lib/threads/threads.service.spec.ts similarity index 100% rename from libs/ai-assistant/src/lib/threads/threads.service.spec.ts rename to libs/openai-assistant/src/lib/threads/threads.service.spec.ts diff --git a/libs/ai-assistant/src/lib/threads/threads.service.ts b/libs/openai-assistant/src/lib/threads/threads.service.ts similarity index 100% rename from libs/ai-assistant/src/lib/threads/threads.service.ts rename to libs/openai-assistant/src/lib/threads/threads.service.ts diff --git a/libs/ai-assistant/tsconfig.json b/libs/openai-assistant/tsconfig.json similarity index 100% rename from libs/ai-assistant/tsconfig.json rename to libs/openai-assistant/tsconfig.json diff --git a/libs/ai-assistant/tsconfig.lib.json b/libs/openai-assistant/tsconfig.lib.json similarity index 100% rename from libs/ai-assistant/tsconfig.lib.json rename to libs/openai-assistant/tsconfig.lib.json diff --git a/libs/ai-assistant/tsconfig.spec.json b/libs/openai-assistant/tsconfig.spec.json similarity index 100% rename from libs/ai-assistant/tsconfig.spec.json rename to libs/openai-assistant/tsconfig.spec.json diff --git a/package.json b/package.json index 8e032de..dadf952 100644 --- a/package.json +++ b/package.json @@ -10,13 +10,13 @@ "build": "npm run build:ai-embedded && npm run build:spa && npm run build:api", "build:spa": "nx build --prod --skip-nx-cache spa", "build:api": "nx build --prod api", - "build:ai-assistant": "nx build --prod ai-assistant", + "build:openai-assistant": "nx build --prod openai-assistant", "build:ai-embedded": "nx build --prod ai-embedded --no-cache && npm run cp:ai-embedded", - "publish": "npm run build:ai-assistant && npm run cp:readme && cd dist/libs/ai-assistant/ && npm publish --access=public && cd ../../..", + "publish": "npm run build:openai-assistant && npm run cp:readme && cd dist/libs/openai-assistant/ && npm publish --access=public && cd ../../..", "cp:ai-embedded": "cp ./dist/libs/ai-embedded/main.js ./apps/spa/src/assets/js/ai-embedded.js", - "cp:readme": "cp ./README.md ./dist/libs/ai-assistant/README.md", + "cp:readme": "cp ./README.md ./dist/libs/openai-assistant/README.md", "lint": "nx run-many --parallel --target=lint --all", - "test:ai-assistant": "nx test ai-assistant", + "test:openai-assistant": "nx test openai-assistant", "test:spa": "nx test spa", "test": "nx run-many --parallel --target=test --all", "format": "nx format:write", diff --git a/tsconfig.base.json b/tsconfig.base.json index a56031f..e49227d 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -15,8 +15,8 @@ "skipDefaultLibCheck": true, "baseUrl": ".", "paths": { - "@boldare/ai-assistant": ["libs/ai-assistant/src/index.ts"], - "@boldare/ai-embedded": ["libs/ai-embedded/src/index.ts"] + "@boldare/ai-embedded": ["libs/ai-embedded/src/index.ts"], + "@boldare/openai-assistant": ["libs/openai-assistant/src/index.ts"] } }, "exclude": ["node_modules", "tmp"]