Skip to content

Commit 30eb067

Browse files
committed
[Chore] Update README.md
1 parent 5941f60 commit 30eb067

File tree

3 files changed

+527
-20
lines changed

3 files changed

+527
-20
lines changed

README.md

Lines changed: 82 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# OpenAssistant
22

3-
[Documentation](https://openassistant-doc.vercel.app) |
3+
[Documentation](https://openassistant-doc.vercel.app) |
44
[Playground](https://openassistant-playground.vercel.app)
55

66
Looking to supercharge your React applications with AI capabilities? Meet OpenAssistant - your new favorite tool for seamlessly integrating AI power into existing React apps without the hassle.
77

88
Unlike general-purpose chatbot library, OpenAssistant takes a different approach. It's specifically engineered to be the bridge between Large Language Models (LLMs) and your application's functionality. Think of it as your application's AI co-pilot that can not only chat with users but also execute complex tasks by leveraging your app's features and external AI plugins.
99

1010
Check out the following examples using OpenAssistant in action:
11-
| kepler.gl AI Assistant (kepler.gl) | GeoDa.AI AI Assistant (geoda.ai) |
11+
| kepler.gl AI Assistant (kepler.gl) | GeoDa.AI AI Assistant (geoda.ai) |
1212
|----|----|
13-
| [<img width="215" alt="Screenshot 2024-12-08 at 9 12 22 PM" src="https://github.com/user-attachments/assets/edc11aee-8945-434b-bec9-cc202fee547c">](https://kepler.gl) | [<img width="240" alt="Screenshot 2024-12-08 at 9 13 43 PM" src="https://github.com/user-attachments/assets/de418af5-7663-48fb-9410-74b4750bc944">](https://geoda.ai) |
13+
| [<img width="215" alt="Screenshot 2024-12-08 at 9 12 22 PM" src="https://github.com/user-attachments/assets/edc11aee-8945-434b-bec9-cc202fee547c">](https://kepler.gl) | [<img width="240" alt="Screenshot 2024-12-08 at 9 13 43 PM" src="https://github.com/user-attachments/assets/de418af5-7663-48fb-9410-74b4750bc944">](https://geoda.ai) |
1414

1515
## 🌟 Features
1616

@@ -41,7 +41,7 @@ Check out the following examples using OpenAssistant in action:
4141

4242
```bash
4343
# Install the core package
44-
npm install @openassistant/core @openassistant/ui
44+
npm install @openassistant/core @openassistant/ui
4545
```
4646

4747
## 🚀 Quick Start
@@ -64,6 +64,8 @@ function App() {
6464
}
6565
```
6666

67+
See the [tutorial](https://openassistant-doc.vercel.app/docs/tutorial-basics/add-config-ui) for more details.
68+
6769
To use the `Screenshot to Ask` feature, you just need to wrap your app with `ScreenshotWrapper` and pass the `startScreenCapture` and `screenCapturedBase64` to the `AiAssistant` component using e.g. redux state. See an example in kepler.gl: [app.tsx](https://github.com/keplergl/kepler.gl/blob/master/examples/demo-app/src/app.tsx) and [assistant-component.tsx](https://github.com/keplergl/kepler.gl/blob/master/src/ai-assistant/src/components/ai-assistant-component.tsx).
6870

6971
Below is a simple example.
@@ -80,29 +82,31 @@ function App() {
8082
return (
8183
<>
8284
<ScreenshotWrapper
83-
setScreenCaptured={setScreenCaptured}
84-
startScreenCapture={startScreenCapture}
85-
setStartScreenCapture={setStartScreenCapture}
86-
>
87-
<div className="h-[600px] w-[400px] m-4">
88-
<AiAssistant
89-
modelProvider="openai"
90-
model="gpt-4"
91-
apiKey="your-api-key"
92-
welcomeMessage="Hello! How can I help you today?"
93-
enableVoice={true}
94-
enableScreenCapture={true}
95-
screenCapturedBase64={screenCaptured}
96-
onScreenshotClick={() => setStartScreenCapture(true)}
97-
onRemoveScreenshot={() => setScreenCaptured('')}
98-
/>
85+
setScreenCaptured={setScreenCaptured}
86+
startScreenCapture={startScreenCapture}
87+
setStartScreenCapture={setStartScreenCapture}
88+
>
89+
<div className="h-[600px] w-[400px] m-4">
90+
<AiAssistant
91+
modelProvider="openai"
92+
model="gpt-4"
93+
apiKey="your-api-key"
94+
welcomeMessage="Hello! How can I help you today?"
95+
enableVoice={true}
96+
enableScreenCapture={true}
97+
screenCapturedBase64={screenCaptured}
98+
onScreenshotClick={() => setStartScreenCapture(true)}
99+
onRemoveScreenshot={() => setScreenCaptured('')}
100+
/>
99101
</div>
100102
</ScreenshotWrapper>
101103
</>
102104
);
103105
}
104106
```
105107

108+
See the [tutorial](https://openassistant-doc.vercel.app/docs/tutorial-basics/screencapture) for more details.
109+
106110
For project with tailwindcss, you can add the following to your tailwind.config.js file:
107111

108112
```js
@@ -122,6 +126,63 @@ module.exports = {
122126
};
123127
```
124128

129+
## 🎯 How to use
130+
131+
OpenAssistant provides a new way that allows users to interact with the data and your application in a natural and creative way.
132+
133+
### 📸 Take a Screenshot to Ask
134+
135+
This feature enables users to capture a screenshot anywhere within kepler.gl application and ask questions about the screenshot.
136+
137+
For example:
138+
- users can take a screenshot of the map (or partial of the map) and ask questions about the map e.g. _`how many counties are in this screenshot`_,
139+
- or take a screenshot of the configuration panel and ask questions about how to use it, e.g. _`How can I adjust the parameters in this panel`_.
140+
- users can even take a screenshot of the plots in the chat panel and ask questions about the plots e.g. _`Can you give me a summary of the plot?`_.
141+
142+
![Screenshot to ask](https://4sq-studio-public.s3.us-west-2.amazonaws.com/statics/keplergl/images/kepler-ai-assistant-screenshot.png 'Screenshot to ask')
143+
144+
#### How to use this feature?
145+
146+
1. Click the "Screenshot to Ask" button in the chat interface
147+
2. A semi-transparent overlay will appear
148+
3. Click and drag to select the area you want to capture
149+
4. Release to complete the capture
150+
5. The screenshot will be displayed in the chat interface
151+
6. You can click the x button on the top right corner of the screenshot to delete the screenshot
152+
153+
### 🗣️ Talk to Ask
154+
155+
This feature enables users to "talk" to the AI assistant. After clicking the "Talk to Ask" button, users can start talking using microphone. When clicking the same button again, the AI assistant will stop listening and send the transcript to the input box.
156+
157+
When using the voice-to-text feature for the first time, users will be prompted to grant microphone access. The browser will display a permission dialog that looks like this:
158+
159+
![Talk to ask](https://4sq-studio-public.s3.us-west-2.amazonaws.com/statics/keplergl/images/kepler-ai-assistant-talk-to-ask.png 'Talk to ask')
160+
161+
After granting access, users can start talking to the AI assistant.
162+
163+
### 📚 Function Calling Support
164+
165+
#### 🤖 Why use LLM function tools?
166+
167+
Function calling enables the AI Assistant to perform specialized tasks that LLMs cannot handle directly, such as complex calculations, data analysis, visualization generation, and integration with external services. This allows the assistant to execute specific operations within your application while maintaining natural language interaction with users.
168+
169+
#### 🔒 Is my data secure?
170+
171+
Yes, the data you used in your application stays within the browser, and will **never** be sent to the LLM. Using function tools, we can engineer the AI assistant to use only the meta data for function calling, e.g. the name of the dataset, the name of the layer, the name of the variables, etc. Here is a process diagram to show how the AI assistant works:
172+
173+
![AI Assistant Diagram](https://4sq-studio-public.s3.us-west-2.amazonaws.com/statics/keplergl/images/kepler-ai-assistant-diagram.png 'AI Assistant Diagram')
174+
175+
### How to create a function tool?
176+
177+
OpenAssistant provides great type support to help you create function tools. You can create a function tool by following the tutorial [here](<[https://openassistant-doc.vercel.app/tutorial-basics/add-function-tool](https://openassistant-doc.vercel.app/docs/tutorial-basics/function-call)>).
178+
179+
OpenAssistant also provides plugins for function tools, which you can use in your application with just a few lines of code. For example,
180+
181+
- the [DuckDB plugin](https://openassistant-doc.vercel.app/docs/tutorial-basics/add-function-tool) allows the AI assistant to query your data using DuckDB. See a tutorial [here](https://openassistant-doc.vercel.app/docs/tutorial-extras/duckdb-plugin).
182+
- the [ECharts plugin](https://openassistant-doc.vercel.app/docs/tutorial-basics/add-function-tool) allows the AI assistant to visualize data using ECharts. See a tutorial [here](https://openassistant-doc.vercel.app/docs/tutorial-extras/echarts-plugin).
183+
- the [Kepler.gl plugin](https://openassistant-doc.vercel.app/docs/tutorial-basics/add-function-tool) allows the AI assistant to create beautiful maps. See a tutorial [here](https://openassistant-doc.vercel.app/docs/tutorial-extras/keplergl-plugin).
184+
- the [GeoDa plugin](https://openassistant-doc.vercel.app/docs/tutorial-basics/add-function-tool) allows the AI assistant to apply spatial data analysis using GeoDa. See a tutorial [here](https://openassistant-doc.vercel.app/docs/tutorial-extras/geoda-plugin).
185+
125186
## 📚 Packages
126187

127188
- **@openassistant/ui**: Pre-built chat UI components
@@ -169,6 +230,7 @@ For detailed documentation and examples, visit our package-specific READMEs:
169230
## 🎯 Examples
170231

171232
Check out our example projects:
233+
172234
- [Simple React Example](examples/simple_react/README.md)
173235
- [React with TailwindCSS Example](examples/react_tailwind/README.md)
174236

website/src/components/HomepageFeatures/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
HighlightFeatureComponent,
99
} from './highlight-features';
1010
import { AiAssistantConfig } from '@openassistant/ui';
11+
import { QuickStart } from './quick-start';
1112

1213
export type HomepageFeaturesProps = {
1314
aiConfig: AiAssistantConfig;
@@ -29,6 +30,7 @@ export default function HomepageFeatures({
2930
/>
3031
))}
3132
<AllFeatures />
33+
<QuickStart />
3234
</section>
3335
);
3436
}

0 commit comments

Comments
 (0)