Skip to content

Commit 534391e

Browse files
committed
Move examples into a new folder and reference them from help screen
Addresses #8
1 parent a982fa8 commit 534391e

File tree

7 files changed

+11
-43
lines changed

7 files changed

+11
-43
lines changed

app/components/ui/Help.tsx

+4-42
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,17 @@
1-
import { Pipeline } from '@/src/pipeline/Pipeline';
2-
import { useSetAtom } from 'jotai';
3-
import { pipelineAtom } from '~/store/store';
4-
import { Button } from '../catalyst/button';
51
import { CustomMarkdown } from '../markdown/Markdown';
6-
import compare from './examples/compare.json';
7-
import complaints from './examples/complaints.json';
8-
import jsonld from './examples/jsonld.json';
9-
import writing from './examples/writing.json';
10-
11-
export function Help({ close }: { close: () => void }) {
12-
const setPipeline = useSetAtom(pipelineAtom);
13-
14-
const setExample = (ex: object) => {
15-
setPipeline(ex as Pipeline);
16-
close();
17-
};
182

3+
export function Help() {
194
return (
205
<div className="prose prose-sm dark:prose-invert max-w-full">
216
<CustomMarkdown>
227
{`LitLytics is an affordable, simple analytics platform for everyone designed to streamline the process of working with complex datasets.
238
By combining LLMs with javascript, LitLytics allows you to generate complete data processing pipelines based on natural language descriptions.
249
2510
With LitLytics, you can transform data, extract insights, and automate routine tasks without having to write any code.
26-
Just describe the task in plain language, and LitLytics will handle the rest – from parsing and cleaning data to generating output in structured formats.`}
27-
</CustomMarkdown>
11+
Just describe the task in plain language, and LitLytics will handle the rest – from parsing and cleaning data to generating output in structured formats.
2812
29-
<h3 className="mt-0">Try some examples:</h3>
30-
31-
<ul>
32-
<li>
33-
<Button plain onClick={() => setExample(complaints)}>
34-
Extracting complaints from negative reviews
35-
</Button>
36-
</li>
37-
<li>
38-
<Button plain onClick={() => setExample(compare)}>
39-
Comparing multiple products based on user input
40-
</Button>
41-
</li>
42-
<li>
43-
<Button plain onClick={() => setExample(jsonld)}>
44-
Converting text into structured formats like JSON-LD
45-
</Button>
46-
</li>
47-
<li>
48-
<Button plain onClick={() => setExample(writing)}>
49-
Writing Instagram posts with proof-reading for clarity and tone
50-
</Button>
51-
</li>
52-
</ul>
13+
You can find examples in the repository in the [examples folder](https://github.com/yamalight/litlytics/tree/main/examples).`}
14+
</CustomMarkdown>
5315
</div>
5416
);
5517
}

app/components/ui/Overlay.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ export function OverlayUI() {
310310
Welcome to 🔥 LitLytics – Your Automated Data Analytics Companion!
311311
</DialogTitle>
312312
<DialogBody className="w-full">
313-
<Help close={() => setIsHelpOpen(false)} />
313+
<Help />
314314
</DialogBody>
315315
</Dialog>
316316

examples/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
You can find following example pipeline for LitLytics in this folder:
2+
3+
- [Extracting complaints from negative reviews](./complaints.json)
4+
- [Comparing multiple products based on user input](./compare.json)
5+
- [Converting text into structured formats like JSON-LD](./jsonld.json)
6+
- [Writing Instagram posts with proof-reading for clarity and tone](./writing.json)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)