diff --git a/apps/api/src/app/chat/chat.config.ts b/apps/api/src/app/chat/chat.config.ts index a00b783..ed41c1e 100644 --- a/apps/api/src/app/chat/chat.config.ts +++ b/apps/api/src/app/chat/chat.config.ts @@ -5,14 +5,21 @@ import 'dotenv/config'; export const assistantParams: AssistantCreateParams = { 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', - metadata: {}, + tools: [{ type: 'code_interpreter' }, { type: 'file_search' }], + model: 'gpt-4-turbo', + temperature: 0.05, }; export const assistantConfig: AssistantConfigParams = { id: process.env['ASSISTANT_ID'] || '', params: assistantParams, filesDir: './apps/api/src/app/knowledge', - files: ['33-things-to-ask-your-digital-product-development-partner.md'], + toolResources: { + fileSearch: { + boldare: ['33-things-to-ask-your-digital-product-development-partner.md'], + }, + codeInterpreter: { + fileNames: [], + }, + }, }; diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index ae7636e..e0564e6 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -9,7 +9,7 @@ async function bootstrap() { const globalPrefix = 'api'; const config = new DocumentBuilder() .setTitle('@boldare/openai-assistant') - .setVersion('1.0.2') + .setVersion('1.1.0') .build(); const document = SwaggerModule.createDocument(app, config); diff --git a/apps/spa/src/app/app.routes.ts b/apps/spa/src/app/app.routes.ts index 158b328..f3e8022 100644 --- a/apps/spa/src/app/app.routes.ts +++ b/apps/spa/src/app/app.routes.ts @@ -6,11 +6,6 @@ export const routes: Routes = [ children: [ { path: '', - pathMatch: 'full', - redirectTo: '/chat', - }, - { - path: 'chat', loadChildren: () => import('./modules/+chat/chat.routes').then(m => m.routes), }, @@ -18,6 +13,6 @@ export const routes: Routes = [ }, { path: '**', - redirectTo: '/chat', + redirectTo: '/', }, ]; diff --git a/apps/spa/src/app/components/chat/chat-footer/chat-footer.component.html b/apps/spa/src/app/components/chat/chat-footer/chat-footer.component.html index 61deb64..d1c6fe1 100644 --- a/apps/spa/src/app/components/chat/chat-footer/chat-footer.component.html +++ b/apps/spa/src/app/components/chat/chat-footer/chat-footer.component.html @@ -1,11 +1,19 @@ @if (isTranscriptionEnabled) { - - } @if (isAttachmentEnabled) { - + + } + @if (isAttachmentEnabled) { + } - + diff --git a/apps/spa/src/app/components/chat/chat-header/chat-header.component.html b/apps/spa/src/app/components/chat/chat-header/chat-header.component.html index 23d8319..22dd9b5 100644 --- a/apps/spa/src/app/components/chat/chat-header/chat-header.component.html +++ b/apps/spa/src/app/components/chat/chat-header/chat-header.component.html @@ -1,16 +1,30 @@
- @if (isConfigEnabled) { - - } @if (isRefreshEnabled) { - + @if (isConfigEnabled) { + + } + @if (isRefreshEnabled) { + }