0.0.26 • Published 4 months ago

react-ai-assist v0.0.26

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Introduction

AI-Assistant helps adding AI capabilities to your React SPA applications while keeping your data secure and private.

License

MIT License.

Features

Usage

You can use the AiAssistant component to add AI capabilities to your React SPA applications directly.

import { AiAssistant } from 'react-ai-assistant';
import 'react-ai-assist/dist/index.css';

<AiAssistant 
  modelProvider="openai"
  model="gpt-4o"
  apiKey="your-api-key"
  welcomeMessage="Hello, how can I help you today?"
  instructions="You are a helpful assistant."
  functions={[]}
/>

See an example: | kepler.gl AI Assistant (kepler.gl) | GeoDa.AI AI Assistant (geoda.ai) | |----|----| | | |

Screenshot to Ask

Click to watch the video

Talk to Ask

Click to watch the video

Installation

npm install react-ai-assistant

Usage

import { AiAssistant } from 'react-ai-assistant';
import 'react-ai-assist/dist/index.css';

<AiAssistant 
  modelProvider="openai"
  model="gpt-4o"
  apiKey="your-api-key"
  welcomeMessage="Hello, how can I help you today?"
  instructions="You are a helpful assistant."
  functions={[]}
/>

You can use useAssistant hook to get the assistant instance directly.

import { useAssistant } from 'react-ai-assistant';

const {initializeAssistant, addAdditionalContext} = useAssistant(assistantProps);

The package provides utiles to manage the assistant state.

For example, you can use it to create a configuration UI for your assistant:

Tutorial

See the example for more details.

0.0.26

4 months ago

0.0.25

5 months ago

0.0.24

5 months ago

0.0.23

5 months ago

0.0.22

5 months ago

0.0.21

5 months ago

0.0.20

5 months ago

0.0.19

5 months ago

0.0.18

5 months ago

0.0.17

5 months ago

0.0.16

5 months ago

0.0.15

5 months ago

0.0.14

5 months ago

0.0.13

5 months ago

0.0.12

5 months ago

0.0.11

5 months ago

0.0.10

5 months ago

0.0.9

5 months ago

0.0.8

5 months ago

0.0.7

5 months ago

0.0.6

5 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago