Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fixie-ai/ai-jsx
The AI Application Framework for Javascript
https://github.com/fixie-ai/ai-jsx
ai jsx nextjs react typescript
Last synced: 2 days ago
JSON representation
The AI Application Framework for Javascript
- Host: GitHub
- URL: https://github.com/fixie-ai/ai-jsx
- Owner: fixie-ai
- License: mit
- Created: 2023-05-30T19:29:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-19T23:44:41.000Z (3 months ago)
- Last Synced: 2024-12-05T00:54:57.343Z (9 days ago)
- Topics: ai, jsx, nextjs, react, typescript
- Language: TypeScript
- Homepage: https://docs.ai-jsx.com
- Size: 19.1 MB
- Stars: 1,081
- Watchers: 26
- Forks: 77
- Open Issues: 33
-
Metadata Files:
- Readme: readme.md
- Contributing: contributing.md
- License: LICENSE
Awesome Lists containing this project
- awesome-langchain-zh - AI.JSX - ai/ai-jsx?style=social): 一个js 的Ai应用框架 (其他LLM框架 / 文章)
- awesome-langchain - AI.JSX - ai/ai-jsx?style=social) (Other LLM Frameworks / Videos Playlists)
README
# AI.JSX — The AI Application Framework for Javascript
[![Docs Site](https://img.shields.io/badge/Docs%20Site-docs.ai--jsx.com-orange)](https://docs.ai-jsx.com)
[![Discord Follow](https://dcbadge.vercel.app/api/server/MsKAeKF8kU?style=flat)](https://discord.gg/MsKAeKF8kU)
[![Twitter Follow](https://img.shields.io/twitter/follow/fixieai?style=social)](https://twitter.com/fixieai)## About AI.JSX
AI.JSX is a framework for building AI applications using Javascript and JSX. With AI.JSX, you get great tools for prompt engineering and can have the LLM render React components in its response (instead of only text). This means you can provide a set of React components and let the LLM construct your UI dynamically at runtime. AI.JSX also provides native support for tools, Document Question & Answering, and much more.
AI.JSX can be used to create standalone LLM applications that can be deployed anywhere Node.js is supported, or it can be used as part of a larger React application.
## Features
AI.JSX comes with the following features out-of-the-box:
- **Componetized** → LLM prompt engineering through modular, reusable components.
- **Model Support** → Use OpenAI, Anthropic, Llama2, or BYOM. Seamlessly switch between model providers and LLM config (e.g. temperature).
- **Complete AI Toolbox** → Built-in support for Tools, Document Question and Answering, and more.
- **Generative UI** → Seamlessly interweave LLM calls with standard UI components. LLM can dynamically render UI from a set of components you provide.
- **Streaming** → Built-in streaming support.
- **Modern Web Stack Support** → First-class support for NextJS and Create React App. (more coming soon)
- **LangChain Integration** → Full support for LangChainJS.## Learning AI.JSX
To get started with AI.JSX, follow these steps:
1. Check out the [Getting Started Guide](https://docs.ai-jsx.com/getting-started).
1. Run through the [AI.JSX Tutorial](https://docs.ai-jsx.com/tutorials/aijsxTutorials/part1-completion).
1. Say "Hello AI World" by cloning the [ai-jsx-template](https://github.com/fixie-ai/ai-jsx-template).
1. Discover many more use cases in the [examples package](https://github.com/fixie-ai/ai-jsx/tree/main/packages/examples).
1. If you're new to AI, read the [Guide for AI Newcomers](https://docs.ai-jsx.com/ai-newcomers).## Examples
Here is a simple example using AI.JSX to generate an AI response to a prompt:
```tsx
import * as AI from 'ai-jsx';
import { ChatCompletion, UserMessage } from 'ai-jsx/core/completion';const app = (
Write a Shakespearean sonnet about AI models.
);
const renderContext = AI.createRenderContext();
const response = await renderContext.render(app);
console.log(response);
```You can play with live demos on our [live demo app](https://ai-jsx-nextjs-demo.vercel.app/) or view [the source code](./packages/nextjs-demo/).
For a full set of examples, see [the examples package](https://github.com/fixie-ai/ai-jsx/tree/main/packages/examples).#### Check-out the 2 minute [intro video](https://github.com/fixie-ai/ai-jsx/assets/476553/301b79e4-7023-4adc-a3a5-72d5b7af0cde).
## Contributing
We welcome contributions! See the [Contribution Guide](packages/docs/docs/contributing/index.md) for details on how to get started.
## License
AI.JSX is open-source software and released under the [MIT license](https://opensource.org/license/mit).