Merge pull request #12 from justinh-rahb/main

Add `localhost` explanation to FAQ, Add tutorials
This commit is contained in:
Timothy Jaeryang Baek 2024-02-25 22:05:55 -05:00 committed by GitHub
commit a03018cf65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 46 additions and 0 deletions

View File

@ -9,4 +9,12 @@ title: "📋 FAQ"
**A:** We require you to sign up to become the admin user for enhanced security. This ensures that if the Open WebUI is ever exposed to external access, your data remains secure. It's important to note that everything is kept local. We do not collect your data. When you sign up, all information stays within your server and never leaves your device. Your privacy and security are our top priorities, ensuring that your data remains under your control at all times.
**Q: Why can't my Docker container connect to services on the host using `localhost`?**
**A:** Inside a Docker container, `localhost` refers to the container itself, not the host machine. This distinction is crucial for networking. To establish a connection from your container to services running on the host, you should use the DNS name `host.docker.internal` instead of `localhost`. This DNS name is specially recognized by Docker to facilitate such connections, effectively treating the host as a reachable entity from within the container, thus bypassing the usual `localhost` scope limitation.
**Q: How do I make my host's services accessible to Docker containers?**
**A:** To make services running on the host accessible to Docker containers, configure these services to listen on all network interfaces, using the IP address `0.0.0.0`, instead of `127.0.0.1` which is limited to localhost only. This configuration allows the services to accept connections from any IP address, including Docker containers. It's important to be aware of the security implications of this setup, especially when operating in environments with potential external access. Implementing appropriate security measures, such as firewalls and authentication, can help mitigate risks.
If you have any further questions or concerns, please don't hesitate to reach out! 🛡️

23
docs/tutorial/images.md Normal file
View File

@ -0,0 +1,23 @@
## Image Generation
Open WebUI now supports image generation through the AUTOMATIC1111 API. To set this up, follow these steps:
### Initial Setup
1. Ensure that you have AUTOMATIC1111 installed.
2. Launch the WebUI with additional flags to enable API access:
```
./webui.sh --api --listen
```
For Docker installations, use the `--listen` flag to allow connections outside of localhost.
### Configuring Open WebUI
1. In Open WebUI, navigate to Settings > Images.
2. In the API URL field, enter the address where AUTOMATIC1111's API is accessible, following this format:
```
http://<your_automatic1111_address>:7860
```
If you're running a Docker installation of Open WebUI and AUTOMATIC1111 on the same host, replace `<your_automatic1111_address>` with `host.docker.internal`.
Please note that, as of now, only the AUTOMATIC1111 API is supported for image generation within Open WebUI.

15
docs/tutorial/litellm.md Normal file
View File

@ -0,0 +1,15 @@
# LiteLLM Config
LiteLLM supports a variety of APIs, both OpenAI-compatible and others. To integrate a new API model, follow these instructions:
1. Go to the Settings > Models > LiteLLM model management interface.
2. In 'Simple' mode, you will only see the option to enter a **Model**.
3. For additional configuration options, click on the 'Simple' toggle to switch to 'Advanced' mode. Here you can enter:
- **Model Name**: The name of the model as you want it to appear in the models list.
- **API Base URL**: The base URL for your API provider. This field can usually be left blank unless your provider specifies a custom endpoint URL.
- **API Key**: Your unique API key. Replace with the key provided by your API provider.
- **API RPM**: The allowed requests per minute for your API. Replace with the appropriate value for your API plan.
4. After entering all the required information, click the '+' button to add the new model to LiteLLM.
For more information on the specific providers and advanced settings, consult the [LiteLLM Providers Documentation](https://litellm.vercel.app/docs/providers).