File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
apps/demos/Demos/HtmlEditor/AITextEditing Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 11import { NgModule , Component , enableProdMode } from '@angular/core' ;
22import { BrowserModule } from '@angular/platform-browser' ;
33import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' ;
4- import { DxHtmlEditorModule } from 'devextreme-angular' ;
4+ import { DxHtmlEditorModule , type DxHtmlEditorTypes } from 'devextreme-angular/ui/html-editor ' ;
55import {
66 AIIntegration ,
77 RequestParams ,
88 Response ,
99} from 'devextreme-angular/common/ai-integration' ;
1010import { AzureOpenAI , OpenAI } from 'openai' ;
1111import { Service } from './app.service' ;
12- import { AICustomCommand } from 'devextreme/ui/html_editor' ;
1312
1413if ( ! / l o c a l h o s t / . test ( document . location . host ) ) {
1514 enableProdMode ( ) ;
@@ -39,7 +38,7 @@ export class AppComponent {
3938
4039 aiIntegration : AIIntegration ;
4140
42- extractKeywordsPrompt : AICustomCommand [ 'prompt' ] ;
41+ extractKeywordsPrompt : DxHtmlEditorTypes . AICustomCommand [ 'prompt' ] ;
4342
4443 valueContent : string ;
4544
Original file line number Diff line number Diff line change 11import { Injectable } from '@angular/core' ;
2- import { AICustomCommand } from 'devextreme/ui/html_editor' ;
2+ import { type DxHtmlEditorTypes } from 'devextreme-angular /ui/html_editor' ;
33
44const AzureOpenAIConfig = {
55 dangerouslyAllowBrowser : true ,
@@ -9,7 +9,7 @@ const AzureOpenAIConfig = {
99 apiKey : 'DEMO' ,
1010} ;
1111
12- const extractKeywordsPrompt : AICustomCommand [ 'prompt' ] = ( ) =>
12+ const extractKeywordsPrompt : DxHtmlEditorTypes . AICustomCommand [ 'prompt' ] = ( ) =>
1313 'Extract a list of keywords from the text and return it as a comma-separated string' ;
1414
1515const markup = `
Original file line number Diff line number Diff line change 1+ import { type HtmlEditorTypes } from 'devextreme-react/html-editor' ;
12import {
23 AIIntegration ,
34 RequestParams ,
45 Response ,
56} from 'devextreme-react/common/ai-integration' ;
6- import { AICustomCommand } from 'devextreme/ui/html_editor' ;
77import { AzureOpenAI , OpenAI } from 'openai' ;
88
99type AIMessage = ( OpenAI . ChatCompletionUserMessageParam | OpenAI . ChatCompletionSystemMessageParam ) & {
@@ -90,5 +90,5 @@ export const markup = `
9090 </ul>
9191` ;
9292
93- export const extractKeywordsPrompt : AICustomCommand [ 'prompt' ] = ( ) =>
93+ export const extractKeywordsPrompt : HtmlEditorTypes . AICustomCommand [ 'prompt' ] = ( ) =>
9494 'Extract a list of keywords from the text and return it as a comma-separated string' ;
You can’t perform that action at this time.
0 commit comments