forked from enricoros/big-AGI
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'enricoros:main' into main
- Loading branch information
Showing
23 changed files
with
426 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,61 @@ | ||
# Local LLM integration with `localai` | ||
# Run your models with `LocalAI` x `big-AGI` | ||
|
||
Integrate local Large Language Models (LLMs) with [LocalAI](https://localai.io). | ||
[LocalAI](https://localai.io) lets you run your AI models locally, or in the cloud. It supports text, image, asr, speech, and more models. | ||
|
||
_Last updated Nov 7, 2023_ | ||
We are deepening the integration between the two products. As of the time of writing, we integrate the following features: | ||
|
||
## Instructions | ||
- ✅ [Text generation](https://localai.io/features/text-generation/) with GPTs | ||
- ✅ [Function calling](https://localai.io/features/openai-functions/) by GPTs 🆕 | ||
- ✅ [Model Gallery](https://localai.io/models/) to list and install models | ||
- ✖️ [Vision API](https://localai.io/features/gpt-vision/) for image chats | ||
- ✖️ [Image generation](https://localai.io/features/image-generation) with stable diffusion | ||
- ✖️ [Audio to Text](https://localai.io/features/audio-to-text/) | ||
- ✖️ [Text to Audio](https://localai.io/features/text-to-audio/) | ||
- ✖️ [Embeddings generation](https://localai.io/features/embeddings/) | ||
- ✖️ [Constrained grammars](https://localai.io/features/constrained_grammars/) (JSON output) | ||
- ✖️ Voice cloning 🆕 | ||
|
||
_Last updated Feb 21, 2024_ | ||
|
||
## Guide | ||
|
||
### LocalAI installation and configuration | ||
|
||
Follow the guide at: https://localai.io/basics/getting_started/ | ||
|
||
For instance with [Use luna-ai-llama2 with docker compose](https://localai.io/basics/getting_started/#example-use-luna-ai-llama2-model-with-docker-compose): | ||
|
||
- clone LocalAI | ||
- get the model | ||
- copy the prompt template | ||
- start docker | ||
- -> the server will be listening on `localhost:8080` | ||
- verify it works by going to [http://localhost:8080/v1/models](http://localhost:8080/v1/models) on | ||
your browser and seeing listed the model you downloaded | ||
- verify it works by browsing to [http://localhost:8080/v1/models](http://localhost:8080/v1/models) | ||
(or the IP:Port of the machine, if running remotely) and seeing listed the model(s) you downloaded | ||
listed in the JSON response. | ||
|
||
### Integrating LocalAI with big-AGI | ||
### Integration: chat with LocalAI | ||
|
||
- Go to Models > Add a model source of type: **LocalAI** | ||
- Enter the address: `http://localhost:8080` (default) | ||
- If running remotely, replace localhost with the IP of the machine. Make sure to use the **IP:Port** format | ||
- Load the models | ||
- Select model & Chat | ||
|
||
> NOTE: LocalAI does not list details about the mdoels. Every model is assumed to be | ||
> capable of chatting, and with a context window of 4096 tokens. | ||
> Please update the [src/modules/llms/transports/server/openai/models.data.ts](../src/modules/llms/server/openai/models.data.ts) | ||
> file with the mapping information between LocalAI model IDs and names/descriptions/tokens, etc. | ||
- Enter the default address: `http://localhost:8080`, or the address of your localAI cloud instance | ||
![configure models](pixels/config-localai-1-models.png) | ||
- If running remotely, replace localhost with the IP of the machine. Make sure to use the **IP:Port** format | ||
- Load the models (click on `Models 🔄`) | ||
- Select the model and chat | ||
|
||
### Integration: Models Gallery | ||
|
||
If the running LocalAI instance is configured with a [Model Gallery](https://localai.io/models/): | ||
|
||
- Go to Models > LocalAI | ||
- Click on `Gallery Admin` | ||
- Select the models to install, and view installation progress | ||
![img.png](pixels/config-localai-2-gallery.png) | ||
|
||
## Troubleshooting | ||
|
||
##### Unknown Context Window Size | ||
|
||
At the time of writing, LocalAI does not publish the model `context window size`. | ||
Every model is assumed to be capable of chatting, and with a context window of 4096 tokens. | ||
Please update the [src/modules/llms/transports/server/openai/models.data.ts](../src/modules/llms/server/openai/models.data.ts) | ||
file with the mapping information between LocalAI model IDs and names/descriptions/tokens, etc. | ||
|
||
# 🤝 Support | ||
|
||
- Hop into the [LocalAI Discord](https://discord.gg/uJAeKSAGDy) for support and questions | ||
- Hop into the [big-AGI Discord](https://discord.gg/MkH4qj2Jp9) for questions | ||
- For big-AGI support, please open an issue in our [big-AGI issue tracker](https://bit.ly/agi-request) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
b407a02
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
hi-zarina – ./
big-agi-tan.vercel.app
hi-zarina-git-main-icras-projects.vercel.app
hi-zarina-icras-projects.vercel.app
hi.zarina.io