mirror of
https://github.com/open-webui/docs
synced 2025-05-20 19:26:22 +00:00
commit
cf13f702e3
@ -273,7 +273,7 @@ Here's how you can use internal Open WebUI functions:
|
|||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from fastapi import Request
|
from fastapi import Request
|
||||||
|
|
||||||
from open_webui.models.user import Users
|
from open_webui.models.users import Users
|
||||||
from open_webui.utils.chat import generate_chat_completion
|
from open_webui.utils.chat import generate_chat_completion
|
||||||
|
|
||||||
class Pipe:
|
class Pipe:
|
||||||
@ -295,7 +295,7 @@ class Pipe:
|
|||||||
### Explanation
|
### Explanation
|
||||||
|
|
||||||
- **Imports**:
|
- **Imports**:
|
||||||
- `Users` from `open_webui.models.user`: To fetch user information.
|
- `Users` from `open_webui.models.users`: To fetch user information.
|
||||||
- `generate_chat_completion` from `open_webui.utils.chat`: To generate chat completions using internal logic.
|
- `generate_chat_completion` from `open_webui.utils.chat`: To generate chat completions using internal logic.
|
||||||
|
|
||||||
- **Asynchronous `pipe` Function**:
|
- **Asynchronous `pipe` Function**:
|
||||||
|
Loading…
Reference in New Issue
Block a user