jQuery/JS Common Types - AIIntegrationOptions

Specifies optional AI service configuration.

import { AIIntegration_Options } from "devextreme/common/ai-integration"
Type:

Object

lang

Specifies the AI response language.

Type:

String

Configure this property to pass language information to the AI service in a system prompt. You can use language codes such as ISO 639 and IETF BCP 47, or plain language names (for instance, "English").

jQuery
index.js
index.html
const aiIntegration = new DevExpress.aiIntegration.AIIntegration({
    sendRequest({ prompt }) {
        // ...
    },
}, {
    lang: 'en-EN',
});
<head>
    <!-- ... -->
    <script type="text/javascript" src="../artifacts/js/dx.ai-integration.js" charset="utf-8"></script>
    <!-- or if using CDN -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/devextreme-dist/26.1.2-beta/js/dx.ai-integration.js"></script>
</head>
Angular
app.component.ts
import { Component } from '@angular/core';
import { AIIntegration } from 'devextreme-angular/common/ai-integration';
// ...
export class AppComponent {
    aiIntegration = new AIIntegration({
        sendRequest: ({ prompt }) => {
            // ...
        },
    }, {
        lang: 'en-EN',
    });
}
Vue
App.vue
<script lang="ts" setup>
import { AIIntegration } from 'devextreme-vue/common/ai-integration';

const aiIntegration = new AIIntegration({
    sendRequest: ({ prompt }) => {
        // ...
    },
}, {
    lang: 'en-EN',
});
</script>
React
App.tsx
import { AIIntegration } from 'devextreme-react/common/ai-integration';

const aiIntegration = new AIIntegration({
    sendRequest: ({ prompt }) => {
        // ...
    },
}, {
    lang: 'en-EN',
});
NOTE
To limit the use of AI resources, specify a single language.