https://github.com/blajanclaudiu/fun
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: blajanclaudiu
- License: mit
- Language: TypeScript
- Default Branch: main
- Size: 66 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Simple • Fast • Private • Open Source
[Live Demo](https://chat.browserai.dev) • [Documentation](https://docs.browserai.dev) • [Discord Community](https://discord.gg/6qfmtSUMdb)
🎉 Featured Project: Check out Browseragent.dev - A no-code AI Agent builder powered by BrowserAI with unlimited executions! Build your own AI agents in minutes.
🌟 Live Demos
| Demo | Description | Try It | |------|-------------|--------| | Chat | Multi-model chat interface | chat.browserai.dev | | Voice Chat | Full-featured with speech recognition & TTS | voice-demo.browserai.dev | | Text-to-Speech | Powered by Kokoro 82M | tts-demo.browserai.dev |
⚡ Key Features
- 🔒 100% Private: All processing happens locally in your browser
- 🚀 WebGPU Accelerated: Near-native performance
- 💰 Zero Server Costs: No complex infrastructure needed
- 🌐 Offline Capable: Works without internet after initial download
- 🎯 Developer Friendly: Simple sdk with multiple engine support
- 📦 Production Ready: Pre-optimized popular models
🎯 Perfect For
- Web developers building AI-powered applications
- Companies needing privacy-conscious AI solutions
- Researchers experimenting with browser-based AI
- Hobbyists exploring AI without infrastructure overhead
- No-code platform builders creating AI-powered tools
✨ Features
- 🎯 Run AI models directly in the browser - no server required!
- ⚡ WebGPU acceleration for blazing fast inference
- 🔄 Seamless switching between MLC and Transformers engines
- 📦 Pre-configured popular models ready to use
- 🛠️ Easy-to-use API for text generation and more
- 🔧 Web Worker support for non-blocking UI performance
- 📊 Structured output generation with JSON schemas
- 🎙️ Speech recognition and text-to-speech capabilities
- 💾 Built-in database support for storing conversations and embeddings
🚀 Quick Start
bash
npm install @browserai/browserai
OR
bash
yarn add @browserai/browserai
Basic Usage
```javascript import { BrowserAI } from '@browserai/browserai';
const browserAI = new BrowserAI();
// Load model with progress tracking await browserAI.loadModel('llama-3.2-1b-instruct', { quantization: 'q4f16_1', onProgress: (progress) => console.log('Loading:', progress.progress + '%') });
// Generate text const response = await browserAI.generateText('Hello, how are you?'); console.log(response.choices[0].message.content); ```
📚 Examples
Text Generation with Options
javascript
const response = await browserAI.generateText('Write a short poem about coding', {
temperature: 0.8,
max_tokens: 100,
system_prompt: "You are a creative poet specialized in technology themes."
});
Chat with System Prompt
```javascript const ai = new BrowserAI(); await ai.loadModel('gemma-2b-it');
const response = await ai.generateText([ { role: 'system', content: 'You are a helpful assistant.' }, { role: 'user', content: 'What is WebGPU?' } ]); ```
Chat with System Prompt
javascript
const response = await browserAI.generateText('List 3 colors', {
json_schema: {
type: "object",
properties: {
colors: {
type: "array",
items: {
type: "object",
properties: {
name: { type: "string" },
hex: { type: "string" }
}
}
}
}
},
response_format: { type: "json_object" }
});
Speech Recognition
```javascript const browserAI = new BrowserAI(); await browserAI.loadModel('whisper-tiny-en');
// Using the built-in recorder await browserAI.startRecording(); const audioBlob = await browserAI.stopRecording(); const transcription = await browserAI.transcribeAudio(audioBlob, { return_timestamps: true, language: 'en' }); ```
Text-to-Speech
javascript
const ai = new BrowserAI();
await ai.loadModel('kokoro-tts');
const audioBuffer = await browserAI.textToSpeech('Hello, how are you today?', {
voice: 'af_bella',
speed: 1.0
});// Play the audio using Web Audio API
const audioContext = new AudioContext();
const source = audioContext.createBufferSource();
audioContext.decodeAudioData(audioBuffer, (buffer) => {
source.buffer = buffer;
source.connect(audioContext.destination);
source.start(0);
});
🔧 Supported Models
More models will be added soon. Request a model by creating an issue.
MLC Models
- Llama-3.2-1b-Instruct
- Llama-3.2-3b-Instruct
- Hermes-Llama-3.2-3b
- SmolLM2-135M-Instruct
- SmolLM2-360M-Instruct
- SmolLM2-1.7B-Instruct
- Qwen-0.5B-Instruct
- Gemma-2B-IT
- TinyLlama-1.1B-Chat-v0.4
- Phi-3.5-mini-instruct
- Qwen2.5-1.5B-Instruct
- DeepSeek-R1-Distill-Qwen-7B
- DeepSeek-R1-Distill-Llama-8B
- Snowflake-Arctic-Embed-M-B32
- Snowflake-Arctic-Embed-S-B32
- Snowflake-Arctic-Embed-M-B4
- Snowflake-Arctic-Embed-S-B4
Transformers Models
- Llama-3.2-1b-Instruct
- Whisper-tiny-en (Speech Recognition)
- Whisper-base-all (Speech Recognition)
- Whisper-small-all (Speech Recognition)
- Kokoro-TTS (Text-to-Speech)
🗺️ Enhanced Roadmap
Phase 1: Foundation
- 🎯 Simplified model initialization
- 📊 Basic monitoring and metrics
- 🔍 Simple RAG implementation
- 🛠️ Developer tools integration
Phase 2: Advanced Features
- 📚 Enhanced RAG capabilities
- Hybrid search
- Auto-chunking
- Source tracking
- 📊 Advanced observability
- Performance dashboards
- Memory profiling
- Error tracking
Phase 3: Enterprise Features
- 🔐 Security features
- 📈 Advanced analytics
- 🤝 Multi-model orchestration
🤝 Contributing
We welcome contributions! Feel free to:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- MLC AI for their incredible mode compilation library and support for webgpu runtime and xgrammar
- Hugging Face and Xenova for their Transformers.js library, licensed under Apache License 2.0. The original code has been modified to work in a browser environment and converted to TypeScript.
- All our contributors and supporters!
Made with ❤️ for the AI community
🚀 Requirements
- Modern browser with WebGPU support (Chrome 113+, Edge 113+, or equivalent)
- For models with
shader-f16requirement, hardware must support 16-bit floating point operations
Owner
- Login: blajanclaudiu
- Kind: user
- Repositories: 1
- Profile: https://github.com/blajanclaudiu
GitHub Events
Total
- Watch event: 1
- Create event: 2
Last Year
- Watch event: 1
- Create event: 2
Dependencies
- actions/checkout v4 composite
- actions/setup-node v4 composite
- next ^14.2.26
- nextra ^3.3.1
- nextra-theme-docs ^3.3.1
- react ^18.2.0
- react-dom ^18.2.0
- @eslint/js ^9.17.0 development
- @types/react ^18.3.18 development
- @types/react-dom ^18.3.5 development
- @vitejs/plugin-react ^4.3.4 development
- autoprefixer ^10.4.20 development
- eslint ^9.17.0 development
- eslint-plugin-react-hooks ^5.0.0 development
- eslint-plugin-react-refresh ^0.4.16 development
- globals ^15.14.0 development
- postcss ^8.4.35 development
- tailwindcss ^3.4.1 development
- typescript ~5.6.2 development
- typescript-eslint ^8.18.2 development
- vite ^5.4.2 development
- @browserai/browserai ^1.0.18
- lucide-react ^0.474.0
- react ^18.3.1
- react-dom ^18.3.1
- @eslint/js ^9.17.0 development
- @types/react ^18.3.18 development
- @types/react-dom ^18.3.5 development
- @vitejs/plugin-react ^4.3.4 development
- eslint ^9.17.0 development
- eslint-plugin-react-hooks ^5.0.0 development
- eslint-plugin-react-refresh ^0.4.16 development
- gh-pages ^6.3.0 development
- globals ^15.14.0 development
- typescript ~5.6.2 development
- typescript-eslint ^8.18.2 development
- vite ^6.0.5 development
- @browserai/browserai ^1.0.18
- @emotion/styled ^11.14.0
- @huggingface/transformers ^3.2.4
- @mlc-ai/web-llm ^0.2.77
- posthog-js ^1.205.0
- react ^18.3.1
- react-dom ^18.3.1
- @eslint/js ^9.17.0 development
- @types/react ^18.3.18 development
- @types/react-dom ^18.3.5 development
- @vitejs/plugin-react ^4.3.4 development
- autoprefixer ^10.4.20 development
- eslint ^9.17.0 development
- eslint-plugin-react-hooks ^5.0.0 development
- eslint-plugin-react-refresh ^0.4.16 development
- globals ^15.14.0 development
- postcss ^8.5.1 development
- tailwindcss ^3.4.17 development
- typescript ~5.6.2 development
- typescript-eslint ^8.18.2 development
- vite ^6.0.5 development
- @browserai/browserai ^1.0.37
- @emotion/react ^11.14.0
- @emotion/styled ^11.14.0
- @huggingface/jinja ^0.3.2
- @huggingface/transformers ^3.2.4
- @mlc-ai/web-llm ^0.2.77
- @types/markdown-it ^14.1.2
- katex ^0.16.20
- lucide-react ^0.473.0
- markdown-it ^14.1.0
- posthog-js ^1.205.0
- react ^18.3.1
- react-dom ^18.3.1
- @eslint/js ^9.17.0 development
- @types/react ^18.3.18 development
- @types/react-dom ^18.3.5 development
- @vitejs/plugin-react ^4.3.4 development
- eslint ^9.17.0 development
- eslint-plugin-react-hooks ^5.0.0 development
- eslint-plugin-react-refresh ^0.4.16 development
- globals ^15.14.0 development
- typescript ~5.6.2 development
- typescript-eslint ^8.18.2 development
- vite ^6.0.5 development
- @browserai/browserai ^1.0.18
- react ^18.3.1
- react-dom ^18.3.1
- @eslint/js ^9.17.0 development
- @types/react ^18.3.18 development
- @types/react-dom ^18.3.5 development
- @vitejs/plugin-react ^4.3.4 development
- autoprefixer ^10.4.20 development
- eslint ^9.17.0 development
- eslint-plugin-react-hooks ^5.0.0 development
- eslint-plugin-react-refresh ^0.4.16 development
- globals ^15.14.0 development
- postcss ^8.5.1 development
- tailwindcss ^3.4.17 development
- typescript ~5.6.2 development
- typescript-eslint ^8.18.2 development
- vite ^6.0.5 development
- @browserai/browserai ^1.0.29
- @emotion/react ^11.14.0
- @emotion/styled ^11.14.0
- @huggingface/jinja ^0.3.2
- @huggingface/transformers ^3.2.4
- @mlc-ai/web-llm ^0.2.77
- @types/markdown-it ^14.1.2
- clsx ^2.1.1
- framer-motion ^12.4.1
- katex ^0.16.20
- lucide-react ^0.473.0
- markdown-it ^14.1.0
- posthog-js ^1.205.0
- react ^18.3.1
- react-dom ^18.3.1
- tailwind-merge ^3.0.1
- @eslint/js ^9.19.0 development
- @types/react ^19.0.8 development
- @types/react-dom ^19.0.3 development
- @vitejs/plugin-react ^4.3.4 development
- eslint ^9.19.0 development
- eslint-plugin-react-hooks ^5.0.0 development
- eslint-plugin-react-refresh ^0.4.18 development
- globals ^15.14.0 development
- typescript ~5.7.2 development
- typescript-eslint ^8.22.0 development
- vite ^6.1.0 development
- @browserai/browserai ^1.0.26
- react ^19.0.0
- react-dom ^19.0.0
- @eslint/js ^9.17.0 development
- @types/react ^18.3.18 development
- @types/react-dom ^18.3.5 development
- @vitejs/plugin-react ^4.3.4 development
- eslint ^9.17.0 development
- eslint-plugin-react-hooks ^5.0.0 development
- eslint-plugin-react-refresh ^0.4.16 development
- globals ^15.14.0 development
- typescript ~5.6.2 development
- typescript-eslint ^8.18.2 development
- vite ^6.0.5 development
- @browserai/browserai ^1.0.29
- @emotion/styled ^11.14.0
- react ^18.3.1
- react-dom ^18.3.1
- @eslint/js ^9.19.0 development
- @types/react ^19.0.8 development
- @types/react-dom ^19.0.3 development
- @vitejs/plugin-react ^4.3.4 development
- eslint ^9.19.0 development
- eslint-plugin-react-hooks ^5.0.0 development
- eslint-plugin-react-refresh ^0.4.18 development
- globals ^15.14.0 development
- typescript ~5.7.2 development
- typescript-eslint ^8.22.0 development
- vite ^6.1.0 development
- @browserai/browserai ^1.0.29
- @emotion/styled ^11.14.0
- react ^19.0.0
- react-dom ^19.0.0
- @eslint/js ^9.17.0 development
- @types/react ^18.3.18 development
- @types/react-dom ^18.3.5 development
- @vitejs/plugin-react ^4.3.4 development
- autoprefixer ^10.4.20 development
- eslint ^9.17.0 development
- eslint-plugin-react-hooks ^5.0.0 development
- eslint-plugin-react-refresh ^0.4.16 development
- globals ^15.14.0 development
- postcss ^8.5.1 development
- tailwindcss ^3.4.17 development
- typescript ~5.6.2 development
- typescript-eslint ^8.18.2 development
- vite ^6.0.5 development
- @browserai/browserai ^1.0.30
- @radix-ui/react-accordion ^1.2.2
- @radix-ui/react-alert-dialog ^1.1.5
- @radix-ui/react-aspect-ratio ^1.1.1
- @radix-ui/react-avatar ^1.1.2
- @radix-ui/react-checkbox ^1.1.3
- @radix-ui/react-context-menu ^2.2.5
- @radix-ui/react-dropdown-menu ^2.1.5
- @radix-ui/react-hover-card ^1.1.5
- @radix-ui/react-label ^2.1.1
- @radix-ui/react-menubar ^1.1.5
- @radix-ui/react-navigation-menu ^1.2.4
- @radix-ui/react-popover ^1.1.5
- @radix-ui/react-progress ^1.1.1
- @radix-ui/react-radio-group ^1.2.2
- @radix-ui/react-scroll-area ^1.2.2
- @radix-ui/react-select ^2.1.5
- @radix-ui/react-separator ^1.1.1
- @radix-ui/react-slider ^1.2.2
- @radix-ui/react-switch ^1.1.2
- @radix-ui/react-tabs ^1.1.2
- @radix-ui/react-toast ^1.2.5
- @radix-ui/react-toggle ^1.1.1
- @radix-ui/react-toggle-group ^1.1.1
- @radix-ui/react-tooltip ^1.1.7
- @types/chrome ^0.0.299
- base64-js ^1.5.1
- class-variance-authority ^0.7.1
- cmdk ^1.0.4
- lucide-react ^0.474.0
- react ^18.3.1
- react-dom ^18.3.1
- react-hook-form ^7.54.2
- react-resizable-panels ^2.1.7
- tailwind-merge ^2.6.0
- tailwindcss-animate ^1.0.7
- vaul ^1.1.2
- vite-plugin-static-copy ^2.2.0
- @types/jest ^29.5.14 development
- @typescript-eslint/eslint-plugin ^8.20.0 development
- @typescript-eslint/parser ^8.20.0 development
- @webgpu/types ^0.1.53 development
- eslint ^9.18.0 development
- jest ^29.7.0 development
- jest-environment-jsdom ^29.7.0 development
- prettier ^3.4.2 development
- ts-jest ^29.2.5 development
- tsup ^8.3.5 development
- typescript ^5.7.3 development
- @huggingface/jinja ^0.3.3
- @mlc-ai/web-llm ^0.2.78
- @types/pdfjs-dist ^2.10.378
- mammoth ^1.9.0
- onnxruntime-web 1.21.0-dev.20250206-d981b153d3
- pdfjs-dist ^4.10.38
- phonemizer ^1.2.1
- tesseract.js ^6.0.0