You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Text-To-Speech (Voice Generation) via OuteTTS, Kokoro, Parler and Dia
19
19
- Provides many compatible APIs endpoints for many popular webservices (KoboldCppApi OpenAiApi OllamaApi A1111ForgeApi ComfyUiApi WhisperTranscribeApi XttsApi OpenAiSpeechApi)
20
20
- Bundled KoboldAI Lite UI with editing tools, save formats, memory, world info, author's note, characters, scenarios.
21
21
- Includes multiple modes (chat, adventure, instruct, storywriter) and UI Themes (aesthetic roleplay, classic writer, corporate assistant, messsenger)
22
22
- Supports loading Tavern Character Cards, importing many different data formats from various sites, reading or exporting JSON savefiles and persistent stories.
23
-
- Many other features including new samplers, regex support, websearch, RAG via TextDB and more.
23
+
- Many other features including new samplers, regex support, websearch, RAG via TextDB, image recognition/vision and more.
24
24
- Ready-to-use binaries for Windows, MacOS, Linux. Runs directly with Colab, Docker, also supports other platforms if self-compiled (like Android (via Termux) and Raspberry PI).
25
25
-[Need help finding a model? Read this!](https://github.com/LostRuins/koboldcpp/wiki#getting-an-ai-model-file)
"msg": f"You are sending requests too quickly. Please try again in {int(ratelimiter-diff)} seconds.",
3888
+
"type": "service_unavailable",
3889
+
}}).encode())
3890
+
return
3891
+
ratelimitlookup[client_ip] =datetime.now()
3876
3892
muint=int(args.multiuser)
3877
3893
ifmuint<=0and ((args.whispermodelandargs.whispermodel!="") or (args.sdmodelandargs.sdmodel!="") or (args.ttsmodelandargs.ttsmodel!="") or (args.embeddingsmodelandargs.embeddingsmodel!="")):
3878
3894
muint=2# this prevents errors when using voice/img together with text
@@ -4619,6 +4635,7 @@ def hide_tooltip(event):
4619
4635
ssl_key_var=ctk.StringVar()
4620
4636
password_var=ctk.StringVar()
4621
4637
maxrequestsize_var=ctk.StringVar(value=str(32))
4638
+
ratelimit_var=ctk.StringVar(value=str(0))
4622
4639
4623
4640
sd_model_var=ctk.StringVar()
4624
4641
sd_lora_var=ctk.StringVar()
@@ -5344,6 +5361,7 @@ def pickpremadetemplate():
5344
5361
makelabelentry(network_tab, "Password: ", password_var, 10, 200,tooltip="Enter a password required to use this instance.\nThis key will be required for all text endpoints.\nImage endpoints are not secured.")
5345
5362
5346
5363
makelabelentry(network_tab, "Max Req. Size (MB):", maxrequestsize_var, row=20, width=50, tooltip="Specify a max request payload size. Any requests to the server larger than this size will be dropped. Do not change if unsure.")
5364
+
makelabelentry(network_tab, "IP Rate Limiter (s):", ratelimit_var, row=22, width=50, tooltip="Rate limits each IP to allow a new request once per X seconds. Do not change if unsure.")
advparser.add_argument("--draftgpulayers","--gpu-layers-draft","--n-gpu-layers-draft","-ngld", metavar=('[layers]'), help="How many layers to offload to GPU for the draft model (default=full offload)", type=int, default=999)
7651
7672
advparser.add_argument("--draftgpusplit", help="GPU layer distribution ratio for draft model (default=same as main). Only works if multi-GPUs selected for MAIN model and tensor_split is set!", metavar=('[Ratios]'), type=float, nargs='+')
7652
7673
advparser.add_argument("--password", metavar=('[API key]'), help="Enter a password required to use this instance. This key will be required for all text endpoints. Image endpoints are not secured.", default=None)
7674
+
advparser.add_argument("--ratelimit", metavar=('[seconds]'), help="If enabled, rate limit generative request by IP address. Each IP can only send a new request once per X seconds.", type=int, default=0)
7653
7675
advparser.add_argument("--ignoremissing", help="Ignores all missing non-essential files, just skipping them instead.", action='store_true')
7654
7676
advparser.add_argument("--chatcompletionsadapter", metavar=('[filename]'), help="Select an optional ChatCompletions Adapter JSON file to force custom instruct tags.", default="AutoGuess")
0 commit comments