-
Notifications
You must be signed in to change notification settings - Fork 1.3k
AI: Restructure & Add New Topics #8255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
arman-boyakhchyan
wants to merge
4
commits into
DevExpress:25_2
Choose a base branch
from
arman-boyakhchyan:ai-integration-common-guide-25-2
base: 25_2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| DevExtreme ships with multiple AI-powered capabilities. You can implement any large language model (LLM) that offers REST/client APIs to activate these capabilities. This includes dedicated AI service providers, as well as self-hosted AI agents. |
6 changes: 6 additions & 0 deletions
6
concepts/90 AI Features/00 Overview/10 AI-Powered DevExtreme Features.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| DevExtreme includes the following AI-powered features: | ||
|
|
||
| - DataGrid/TreeList - AI Columns | ||
| - Form - Smart Paste | ||
| - HTML Editor - AI-Powered Text Editing | ||
| - Chat - Integration with AI Assistants |
6 changes: 6 additions & 0 deletions
6
concepts/90 AI Features/10 aiIntegration Setup/00 aiIntegration Setup.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| The aiIntegration type powers AI features in the following components: | ||
|
|
||
| - DataGrid | ||
| - Form | ||
| - HTML Editor | ||
| - TreeList |
1 change: 1 addition & 0 deletions
1
...ts/90 AI Features/10 aiIntegration Setup/10 AI Service Provider Requirements.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| DevExtreme AI-Powered features support all AI service providers that offer REST or client APIs. This includes self-hosted AI agents. |
161 changes: 161 additions & 0 deletions
161
...s/90 AI Features/10 aiIntegration Setup/20 Connect to an AI Service Provider.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| To use [aiIntegration]() within your project, import the type as follows: | ||
|
|
||
| --- | ||
| ##### jQuery | ||
|
|
||
| <!-- tab: index.html --> | ||
| <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/cdnjs_version/js/dx.ai-integration.js"></script> | ||
| </head> | ||
|
|
||
| To connect to an AI service provider using REST APIs, implement the [fetch API]() to define an AI request in the [sendRequest]() function within **aiIntegration**.**aiProvider**. Use the **fetch** promise within the [Request]() object returned by **sendRequest** as follows: | ||
|
|
||
| <!-- tab: index.js --> | ||
| const aiIntegration = new DevExpress.aiIntegration({ | ||
| sendRequest(params) { | ||
| const promise = fetch('https://example.org/post', { | ||
| method: 'POST', | ||
| headers: { ... }, // Add custom headers here, including API authentication headers | ||
| body: JSON.stringify(params.prompt), | ||
| }).then(async (response) => { | ||
| const result = await response.json(); | ||
|
|
||
| return result.output || ''; | ||
| }) | ||
|
|
||
| return { | ||
| promise, | ||
| abort: () => { | ||
| // Add an abort request | ||
| }, | ||
| }; | ||
| }, | ||
| }); | ||
|
|
||
| ##### Angular | ||
|
|
||
| <!-- tab: app.component.ts --> | ||
| import { AIIntegration } from 'devextreme-angular/common/ai-integration'; | ||
|
|
||
| aaa | ||
|
|
||
| <!-- tab: app.component.ts --> | ||
| import { Component } from '@angular/core'; | ||
| import { HttpClient, HttpHeaders } from '@angular/common/http'; | ||
| import { AIIntegration } from 'devextreme-angular/common/ai-integration'; | ||
| // ... | ||
| export class AppComponent { | ||
| constructor(private http: HttpClient) {} | ||
| provider = { | ||
| sendRequest: ({ prompt }) => { | ||
| const headers = new HttpHeaders({ | ||
| // Add any custom headers here | ||
| }); | ||
|
|
||
| const body = JSON.stringify({ prompt }); | ||
|
|
||
| const promise = this.http | ||
| .post<{ output?: string }>('https://example.org/post', body, { | ||
| headers, | ||
| signal: controller.signal, | ||
| }) | ||
| .toPromise() | ||
| .then((result) => result.output || ''); | ||
|
|
||
| return { | ||
| promise, | ||
| abort: () => { | ||
| // Add an abort request | ||
| }, | ||
| }; | ||
| }, | ||
| }; | ||
| aiIntegration = new AIIntegration(provider); | ||
| } | ||
|
|
||
| ##### Vue | ||
|
|
||
| <!-- tab: App.vue --> | ||
| <script lang="ts" setup> | ||
| import { AIIntegration } from 'devextreme-vue/common/ai-integration'; | ||
|
|
||
| </script> | ||
|
|
||
| aaa | ||
|
|
||
| <!-- tab: App.vue --> | ||
| <script lang="ts" setup> | ||
| import { ref } from 'vue'; | ||
| import { AIIntegration } from 'devextreme-vue/common/ai-integration'; | ||
|
|
||
| const provider = { | ||
| sendRequest: ({ prompt }) => { | ||
| const headers = { | ||
| // Add any custom headers here | ||
| }; | ||
|
|
||
| const promise = fetch('https://example.org/post', { | ||
| method: 'POST', | ||
| headers, | ||
| body: JSON.stringify({ prompt }), | ||
| signal: controller.signal, | ||
| }) | ||
| .then(async (response) => { | ||
| const result = await response.json(); | ||
| return result.output || ''; | ||
| }); | ||
|
|
||
| return { | ||
| promise, | ||
| abort: () => { | ||
| // Add an abort request | ||
| }, | ||
| }; | ||
| }, | ||
| }; | ||
|
|
||
| const aiIntegration = new AIIntegration(provider); | ||
| </script> | ||
|
|
||
| ##### React | ||
|
|
||
| <!-- tab: App.tsx --> | ||
| import { AIIntegration } from 'devextreme-react/common/ai-integration'; | ||
|
|
||
| aaa | ||
|
|
||
| <!-- tab: App.tsx --> | ||
| import { AIIntegration } from 'devextreme-react/common/ai-integration'; | ||
|
|
||
| const provider = { | ||
| sendRequest: ({ prompt }) => { | ||
| const headers = { | ||
| 'Content-Type': 'application/json', | ||
| // Add any custom headers here | ||
| }; | ||
|
|
||
| const promise = fetch('https://example.org/post', { | ||
| method: 'POST', | ||
| headers, | ||
| body: JSON.stringify({ prompt }), | ||
| signal: controller.signal, | ||
| }) | ||
| .then(async (response) => { | ||
| const result = await response.json(); | ||
| return result.output || ''; | ||
| }); | ||
|
|
||
| return { | ||
| promise, | ||
| abort: () => { | ||
| // Add an abort request | ||
| }, | ||
| }; | ||
| }, | ||
| }; | ||
| const aiIntegration = new AIIntegration(provider); | ||
|
|
||
| --- |
Empty file.
Empty file.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The destination title "00 Overview of AI-Powered DevExtreme Features" is longer and more verbose than the typical pattern used in this file. Consider simplifying it to match existing conventions, such as "00 Overview" (similar to line 47: "15 Common Concepts/15 Data Validation/00 Overview") or just "Overview" (similar to line 58: "15 Common Concepts/40 Localization and Globalization/Overview").