-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
105 additions
and
109 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
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,14 +1,13 @@ | ||
# OpenAssistant Inference Server | ||
|
||
Workers communicate with the `/work` endpoint. They provide their configuration | ||
and if a task is available, the server returns it. The server also returns the | ||
key of a Redis list where the worker should push the results. | ||
Workers communicate with the `/work` endpoint via Websocket. They provide their | ||
configuration and if a task is available, the server returns it. The worker then | ||
performs the task and returns the result in a streaming fashion to the server, | ||
also via websocket. | ||
|
||
Clients communicate first with the `/complete` endpoint to place a request for | ||
prompt completion. The server returns a unique ID for the request. The client | ||
then polls the `/stream` endpoint with the ID to check if the request has been | ||
assigned to a worker. Once it is assigned, the response will be a SSE event | ||
source. | ||
then calls the `/stream` endpoint with the ID to get an SSE event source. | ||
|
||
Notably, `/complete` could be proxied via a frontend, while `/stream` can be | ||
accessed directly by the client, since the unique ID provides enough security. |
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
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ loguru | |
pydantic | ||
redis | ||
sse-starlette | ||
websockets |
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
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
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,6 +1,6 @@ | ||
loguru | ||
redis | ||
requests | ||
rel | ||
torch | ||
transformers | ||
typer | ||
websocket-client |
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