Skip to content

Commit 2c6f7a3

Browse files
committed
update readmes
1 parent 23bdb86 commit 2c6f7a3

File tree

6 files changed

+27
-67
lines changed

6 files changed

+27
-67
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ Easy-to-use headless React Hooks to run LLMs in the browser with WebGPU. As simp
2222
npm install @react-llm/headless
2323
```
2424

25+
## Packages in this repository
26+
- [@react-llm/model](packages/model) - The LLM model and tokenizer compiled for the browser
27+
- [@react-llm/retro-ui](packages/retro-ui) - Retro-themed UI for the hooks
28+
- [@react-llm/extension](packages/extension) - Chrome Extension that uses the hooks
29+
- [@react-llm/headless](packages/headless) - Headless React Hooks for running LLMs in the browser
30+
2531

2632
## **useLLM** API
2733
### Types

assets/extension-demo.webp

790 KB
Binary file not shown.

packages/extension/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121
npm-debug.log*
2222
yarn-debug.log*
2323
yarn-error.log*
24+
25+
dist/

packages/extension/README.md

+11-64
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,17 @@
1-
# Getting Started with Create React App
1+
# LLaMaTab Extension
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
A large language model that runs entirely inside a Chrome Extension. It runs the instruction tuned Vicuna 13B model, based off of LLaMa.
44

5-
## Available Scripts
5+
![image](../../assets/extension-demo.webp)
66

7-
In the project directory, you can run:
7+
### Installation
8+
To install, head to the [releases](https://github.com/r2d4/react-llm/releases/latest) tab and download the latest `llamatab-extension.zip` file. Then, in Chrome, go to `chrome://extensions`, enable developer mode, and click "Load unpacked". Select the `llamatab-extension` folder from the zip file you downloaded. You should now see the LLaMaTab extension in your toolbar.
89

9-
### `npm start`
10+
## Building from source
1011

11-
Runs the app in the development mode.\
12-
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
12+
```bash
13+
pnpm install
14+
pnpm build:extension
15+
```
1316

14-
The page will reload when you make changes.\
15-
You may also see any lint errors in the console.
16-
17-
### `npm test`
18-
19-
Launches the test runner in the interactive watch mode.\
20-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21-
22-
### `npm run build`
23-
24-
Builds the app for production to the `build` folder.\
25-
It correctly bundles React in production mode and optimizes the build for the best performance.
26-
27-
The build is minified and the filenames include the hashes.\
28-
Your app is ready to be deployed!
29-
30-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31-
32-
### `npm run eject`
33-
34-
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
35-
36-
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37-
38-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
39-
40-
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
41-
42-
## Learn More
43-
44-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45-
46-
To learn React, check out the [React documentation](https://reactjs.org/).
47-
48-
### Code Splitting
49-
50-
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51-
52-
### Analyzing the Bundle Size
53-
54-
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55-
56-
### Making a Progressive Web App
57-
58-
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59-
60-
### Advanced Configuration
61-
62-
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63-
64-
### Deployment
65-
66-
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67-
68-
### `npm run build` fails to minify
69-
70-
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
17+
The extension zip file will be built to `dist/llamatab-extension.zip`.

packages/extension/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "thiggle-clipper",
2+
"name": "@react-llm/llamatab",
33
"version": "0.0.1",
44
"private": true,
55
"dependencies": {
@@ -20,7 +20,8 @@
2020
"build": "react-scripts build && npx rollup -c",
2121
"test": "react-scripts test",
2222
"eject": "react-scripts eject",
23-
"dev": "nodemon --watch src --watch public --watch node_modules -e js,jsx,css,html,json,ts,tsx --exec 'pnpm run build'"
23+
"dev": "nodemon --watch src --watch public --watch node_modules -e js,jsx,css,html,json,ts,tsx --exec 'pnpm run build'",
24+
"build:extension": "mkdir -p dist/ && pnpm run build && zip -r dist/llamatab-extension.zip build"
2425
},
2526
"eslintConfig": {
2627
"extends": [

packages/extension/src/pages/MainPage.jsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ const MainPage = ({
6060
onChange={(e) => setPrompt(e.target.value)}
6161
>
6262
{promptList.map((item, idx) => (
63-
<option key={idx} value={item}>
63+
<option
64+
className="whitespace-nowrap overflow-hidden text-ellipsis w-[50x]"
65+
key={idx}
66+
value={item}
67+
>
6468
{item}
6569
</option>
6670
))}

0 commit comments

Comments
 (0)