Skip to content

Latest commit

 

History

History
234 lines (198 loc) · 9.63 KB

README.md

File metadata and controls

234 lines (198 loc) · 9.63 KB

Syncfusion Vue AI Samples

This project is a comprehensive application showcasing Essential JS 2 Vue components integrated with AI features.

This application utilizes the latest packages and requires Node.js version v18.17.0 or higher.

Getting Started

To get started, clone the smart-ai-samples repository and navigate to the smart-ai-samples/vue directory:

git clone https://github.com/syncfusion/smart-ai-samples.git
cd smart-ai-samples/vue

Installation

All required packages are pre-configured in the package.json file. Install the dependencies by running:

npm install

License Registration

Before using Syncfusion components, register your license key in the main.ts file of your Vue project:

import { createApp } from 'vue'
import App from './App.vue'
import { registerLicense } from '@syncfusion/ej2-base';

// Register your Syncfusion license key
registerLicense('YOUR_LICENSE_KEY');
createApp(App).mount('#app')

For more details on license registration, refer to the official documentation.

Local Embeddings

The following samples use a local embedding pre-trained model from Hugging Face and do not require Azure OpenAI. The transformers.js library from Hugging Face is utilized to run the model in a client-side application without the need for a server. To learn more about transformers, refer here.

  • DataGrid (Semantic Filtering)
  • ComboBox (Embeddings)

Configuring AI Services

This project utilizes AI services to enhance component functionality. The Azure OpenAI service has been configured for this demo, but the Gemini model with the Vercel SDK can also be used.

To set up the AI services, navigate to ./src/ai-components/common/ai-models.ts and replace the placeholders with your actual credentials:

const azure = createAzure({
    resourceName: 'YOUR_RESOURCE_NAME',
    apiKey: 'YOUR_API_KEY',
});
const aiModel = azure('YOUR_MODEL_NAME');
// for gemini model
const google = createGoogleGenerativeAI({
    baseURL: "https://generativelanguage.googleapis.com/v1beta",
    apiKey: "API_KEY"
});
const aiModel = google('YOUR_MODEL_NAME');

Your Azure endpoint should resemble: https://{resource_name}.openai.azure.com/

For more information on Azure OpenAI configuration, consult the Vercel AI SDK documentation.

Image Editor AI Configuration

The Image Editor AI feature uses Stability AI for AI image processing. To set it up:

  1. Obtain an API key from Stability AI.
  2. In ./src/ai-components/common/stability-model.ts, replace the placeholder with your actual API key:
const apiKey = `Bearer YOUR_API_KEY`;

Development Server

To run the application, use the following npm script:

npm run dev

This command will start the application and open it in your default web browser.

Additional Resources

For more information about Essential JS 2 Vue components, refer to these resources:

Project Documentation

This table provides an overview of all the AI Samples in this project, along with links to their respective README files for detailed documentation.

Section Component / Feature Description Documentation Link
Smart Paste Button Smart Paste Functionality Automatically fills out forms using clipboard data, improving data entry efficiency. Read More
Smart TextArea Sentence-Level Autocompletion Provides real-time sentence suggestions based on user input, enhancing typing efficiency with AI. Read More
ComboBox Semantic Search Advanced search capabilities using context and meaning rather than exact keywords. Read More
Data Grid Semantic Filtering Filters data semantically. Read More
Predictive Data Entry Detects anomalies in datasets. Read More
Anomaly Detection Detects anomalies in datasets. Read More
Scheduler Smart Paste Integration Converts natural language text into scheduler events, adding them as structured appointments. Read More
Gantt Task Prioritize AI-based task prioritization tool. Read More
Progress Predictor Predicts project progress and completion. Read More
Resource Allocator Optimizes resource allocation. Read More
RichTextEditor AI Integration Enhances text editing with features like content generation, summarization, rephrasing, translation, and grammar correction. Read More
Kanban Board Sentiment Analysis Analyzes customer feedback sentiments. Read More
Image Editor AI Image Editing Advanced image editing features including Magic Eraser, Background Changer, and Background Remover for enhanced creativity and precision. Read More
Diagram TextToMindMap Creates dynamic mindmaps using AI-generated content. Read More
TextToFlowChart Creates flowcharts based on AI-generated workflows. Read More
Document Editor Smart Editor Enhances document editing with rewriting, grammar checking, and translation. Read More
Writing Assist Generates new content based on user input and assists in expanding ideas. Read More
Maps Weather Forecast Displays weather forecasts on a map. Read More
Pivot Table AI Data Analysis AI integration for smart data aggregation, predictive modeling, adaptive filtering, and real-time interaction, enhancing data analysis and visualization. Read More
Query Builder Natural Language Querying Allows users to build queries in plain language, with the system interpreting the intent and generating the appropriate query. Read More
TreeGrid Hierarchical Data Structuring Uses AI to correct and organize hierarchical data in a Tree Grid, fixing parent-child relationships to ensure accurate data nesting. Read More