mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-01 20:04:04 +01:00
654933c634
Previous title: Add api_streaming extension and update api-example-stream to use it * Merge with latest main * Add parameter capturing encoder_repetition_penalty * Change some defaults, minor fixes * Add --api, --public-api flags * remove unneeded/broken comment from blocking API startup. The comment is already correctly emitted in try_start_cloudflared by calling the lambda we pass in. * Update on_start message for blocking_api, it should say 'non-streaming' and not 'streaming' * Update the API examples * Change a comment * Update README * Remove the gradio API * Remove unused import * Minor change * Remove unused import --------- Co-authored-by: oobabooga <112222186+oobabooga@users.noreply.github.com>
11 lines
341 B
Python
11 lines
341 B
Python
import extensions.api.blocking_api as blocking_api
|
|
import extensions.api.streaming_api as streaming_api
|
|
from modules import shared
|
|
|
|
BLOCKING_PORT = 5000
|
|
STREAMING_PORT = 5005
|
|
|
|
def setup():
|
|
blocking_api.start_server(BLOCKING_PORT, share=shared.args.public_api)
|
|
streaming_api.start_server(STREAMING_PORT, share=shared.args.public_api)
|