Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api-reference/10 UI Components/Errors and Warnings/E1068.md
Comment thread
dmirgaev marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: ErrorsUIWidgets.E1068
---
---
##### shortDescription
<!-- Description goes here -->
Occurs in the [DataGrid](/Documentation/Guide/UI_Components/DataGrid/Overview/) and [TreeList](/Documentation/Guide/UI_Components/TreeList/Overview/) when **aiAssistant**.**aiIntegration** is not configured.

---
<!-- Description goes here -->
To resolve this error, specify **aiIntegration** at the [component level](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/#aiIntegration) or in the [aiAssistant](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/aiAssistant/#aiIntegration) configuration object.
Comment thread
arman-boyakhchyan marked this conversation as resolved.
Comment on lines +6 to +9
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
id: GridBase.Options.aiAssistant
type: AIAssistant
inheritsType: AIAssistant
---
---
##### shortDescription
<!-- Description goes here -->
Configures the {WidgetName} AI Assistant.

---
<!-- Description goes here -->
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,106 @@ default: null
---
---
##### shortDescription
<!-- Description goes here -->
A function that is executed before an AI Assistant request is created.

##### param(e): Object
<!-- Description goes here -->
Information about the event.

##### field(e.cancel): Boolean
<!-- Description goes here -->
Allows you to cancel the request.

##### field(e.component): {WidgetName}
<!-- Description goes here -->
The UI component's instance.

##### field(e.context): Record
<!-- Description goes here -->
{WidgetName} context (data and component state information) included in the AI Assistant request.
Comment on lines 18 to +20

##### field(e.element): DxElement
<!-- Description goes here -->
#include common-ref-elementparam with { element: "UI component" }

##### field(e.model): any
<!-- Description goes here -->
The model data. Available only if you use Knockout.

##### field(e.responseSchema): Record
<!-- Description goes here -->
The JSON schema of the AI Assistant response.
Comment on lines 28 to +29

---
Use this handler to modify the AI Assistant request.

The following code snippet modifies the **e.context** parameter to add context to the request:

---

##### jQuery

<!-- tab: index.js -->
$('#{widgetname}-container').dx{WidgetName}({
onAIAssistantRequestCreating(e) {
e.context = {
...e.context,
// Add context here
};
},
});

##### Angular

<!-- tab: app.component.html -->
<dx-{widget-name} ...
(onAIAssistantRequestCreating)="handleAIAssistantRequestCreating($event)"
></dx-{widget-name}>

<!-- tab: app.component.ts -->
import { Dx{WidgetName}Module, type Dx{WidgetName}Types } from 'devextreme-angular/ui/{widget-name}';

// ...
export class AppComponent {
handleAIAssistantRequestCreating(e: Dx{WidgetName}Types.AIAssistantRequestCreatingEvent) {
e.context = {
...e.context,
// Add context here
};
}
}

##### Vue

<!-- tab: App.vue -->
<template>
<Dx{WidgetName} ...
@a-i-assistant-request-creating="handleAIAssistantRequestCreating"
/>
</template>

<script setup lang="ts">
import { Dx{WidgetName}, type Dx{WidgetName}Types } from 'devextreme-vue/{widget-name}';

function handleAIAssistantRequestCreating(e: Dx{WidgetName}Types.AIAssistantRequestCreatingEvent) {
e.context = {
...e.context,
// Add context here
};
}
</script>

##### React

<!-- tab: App.tsx -->
import { {WidgetName}, type {WidgetName}Types } from 'devextreme-react/{widget-name}';

function handleAIAssistantRequestCreating(e: {WidgetName}Types.AIAssistantRequestCreatingEvent) {
e.context = {
...e.context,
// Add context here
};
}

function App() {
return (
<{WidgetName} ...
onAIAssistantRequestCreating={handleAIAssistantRequestCreating}
/>
);
}
Comment on lines +40 to +108

---
<!-- Description goes here -->
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ type: eventType
---
---
##### shortDescription
<!-- Description goes here -->
Raised before an AI Assistant request is created.

---
<!-- Description goes here -->
Main article: [onAIAssistantRequestCreating]({basewidgetpath}/Configuration/#onAIAssistantRequestCreating)

#####See Also#####
#include common-link-handleevents
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,103 @@ type: function(e)
---
---
##### shortDescription
<!-- Description goes here -->
A function that is executed before an AI Assistant request is created.

##### param(e): ui/data_grid:AIAssistantRequestCreatingEvent
<!-- Description goes here -->
Information about the event.

##### field(e.cancel): Boolean
<!-- Description goes here -->
Allows you to cancel the request.

##### field(e.component): {WidgetName}
<!-- Description goes here -->
The UI component's instance.

##### field(e.context): Object
<!-- Description goes here -->
{WidgetName} context (data and component state information) included in the AI Assistant request.

##### field(e.element): DxElement
<!-- Description goes here -->
#include common-ref-elementparam with { element: "UI component" }

##### field(e.responseSchema): Object
<!-- Description goes here -->
The JSON schema of the AI Assistant response.

---
Use this handler to modify the AI Assistant request.

The following code snippet modifies the **e.context** parameter to add request context:

---

##### jQuery

<!-- tab: index.js -->
$('#{widgetname}-container').dx{WidgetName}({
onAIAssistantRequestCreating(e) {
e.context = {
...e.context,
// Add context here
};
},
});

##### Angular

<!-- tab: app.component.html -->
<dx-{widget-name} ...
(onAIAssistantRequestCreating)="handleAIAssistantRequestCreating($event)"
></dx-{widget-name}>

<!-- tab: app.component.ts -->
import { Dx{WidgetName}Module, type Dx{WidgetName}Types } from 'devextreme-angular/ui/{widget-name}';

// ...
export class AppComponent {
handleAIAssistantRequestCreating(e: Dx{WidgetName}Types.AIAssistantRequestCreatingEvent) {
e.context = {
...e.context,
// Add context here
};
}
}

##### Vue

<!-- tab: App.vue -->
<template>
<Dx{WidgetName} ...
@a-i-assistant-request-creating="handleAIAssistantRequestCreating"
/>
</template>

<script setup lang="ts">
import { Dx{WidgetName}, type Dx{WidgetName}Types } from 'devextreme-vue/{widget-name}';

function handleAIAssistantRequestCreating(e: Dx{WidgetName}Types.AIAssistantRequestCreatingEvent) {
e.context = {
...e.context,
// Add context here
};
}
</script>

##### React

<!-- tab: App.tsx -->
import { {WidgetName}, type {WidgetName}Types } from 'devextreme-react/{widget-name}';

function handleAIAssistantRequestCreating(e: {WidgetName}Types.AIAssistantRequestCreatingEvent) {
e.context = {
...e.context,
// Add context here
};
}

function App() {
return (
<{WidgetName} ...
onAIAssistantRequestCreating={handleAIAssistantRequestCreating}
/>
);
}
Comment on lines +36 to +104

---
<!-- Description goes here -->
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ generateTypeLink:
---
---
##### shortDescription
<!-- Description goes here -->
The argument type in the [aIAssistantRequestCreating]({basewidgetpath}/Events/#aIAssistantRequestCreating) event.

---
<!-- Description goes here -->
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,103 @@ type: function(e)
---
---
##### shortDescription
<!-- Description goes here -->
A function that is executed before an AI Assistant request is created.

##### param(e): ui/tree_list:AIAssistantRequestCreatingEvent
<!-- Description goes here -->
Information about the event.

##### field(e.cancel): Boolean
<!-- Description goes here -->
Allows you to cancel the request.

##### field(e.component): {WidgetName}
<!-- Description goes here -->
The UI component's instance.

##### field(e.context): Object
<!-- Description goes here -->
{WidgetName} context (data and component state information) included in the AI Assistant request.

##### field(e.element): DxElement
<!-- Description goes here -->
#include common-ref-elementparam with { element: "UI component" }

##### field(e.responseSchema): Object
<!-- Description goes here -->
The JSON schema of the AI Assistant response.

---
Use this handler to modify the AI Assistant request.

The following code snippet modifies the **e.context** parameter to add request context:

---

##### jQuery

<!-- tab: index.js -->
$('#{widgetname}-container').dx{WidgetName}({
onAIAssistantRequestCreating(e) {
e.context = {
...e.context,
// Add context here
};
},
});

##### Angular

<!-- tab: app.component.html -->
<dx-{widget-name} ...
(onAIAssistantRequestCreating)="handleAIAssistantRequestCreating($event)"
></dx-{widget-name}>

<!-- tab: app.component.ts -->
import { Dx{WidgetName}Module, type Dx{WidgetName}Types } from 'devextreme-angular/ui/{widget-name}';

// ...
export class AppComponent {
handleAIAssistantRequestCreating(e: Dx{WidgetName}Types.AIAssistantRequestCreatingEvent) {
e.context = {
...e.context,
// Add context here
};
}
}

##### Vue

<!-- tab: App.vue -->
<template>
<Dx{WidgetName} ...
@a-i-assistant-request-creating="handleAIAssistantRequestCreating"
/>
</template>

<script setup lang="ts">
import { Dx{WidgetName}, type Dx{WidgetName}Types } from 'devextreme-vue/{widget-name}';

function handleAIAssistantRequestCreating(e: Dx{WidgetName}Types.AIAssistantRequestCreatingEvent) {
e.context = {
...e.context,
// Add context here
};
}
</script>

##### React

<!-- tab: App.tsx -->
import { {WidgetName}, type {WidgetName}Types } from 'devextreme-react/{widget-name}';

function handleAIAssistantRequestCreating(e: {WidgetName}Types.AIAssistantRequestCreatingEvent) {
e.context = {
...e.context,
// Add context here
};
}

function App() {
return (
<{WidgetName} ...
onAIAssistantRequestCreating={handleAIAssistantRequestCreating}
/>
);
}
Comment on lines +36 to +104

---
<!-- Description goes here -->
Loading
Loading