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
143
143
- Provides many compatible APIs endpoints for many popular webservices (KoboldCppApi OpenAiApi OllamaApi A1111ForgeApi ComfyUiApi WhisperTranscribeApi XttsApi OpenAiSpeechApi)
144
144
- Bundled KoboldAI Lite UI with editing tools, save formats, memory, world info, author's note, characters, scenarios.
145
145
- Includes multiple modes (chat, adventure, instruct, storywriter) and UI Themes (aesthetic roleplay, classic writer, corporate assistant, messsenger)
146
146
- Supports loading Tavern Character Cards, importing many different data formats from various sites, reading or exporting JSON savefiles and persistent stories.
147
-
- Many other features including new samplers, regex support, websearch, RAG via TextDB and more.
147
+
- Many other features including new samplers, regex support, websearch, RAG via TextDB, image recognition/vision and more.
148
148
- 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).
149
149
-[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.",
4919
+
"type": "service_unavailable",
4920
+
}}).encode())
4921
+
return
4922
+
ratelimitlookup[client_ip] =datetime.now()
4907
4923
muint=int(args.multiuser)
4908
4924
ifmuint<=0and ((args.whispermodelandargs.whispermodel!="") or (args.sdmodelandargs.sdmodel!="") or (args.ttsmodelandargs.ttsmodel!="") or (args.embeddingsmodelandargs.embeddingsmodel!="")):
4909
4925
muint=2# this prevents errors when using voice/img together with text
@@ -5667,6 +5683,7 @@ def hide_tooltip(event):
5667
5683
ssl_key_var=ctk.StringVar()
5668
5684
password_var=ctk.StringVar()
5669
5685
maxrequestsize_var=ctk.StringVar(value=str(32))
5686
+
ratelimit_var=ctk.StringVar(value=str(0))
5670
5687
5671
5688
sd_model_var=ctk.StringVar()
5672
5689
sd_lora_var=ctk.StringVar()
@@ -6395,6 +6412,7 @@ def pickpremadetemplate():
6395
6412
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.")
6396
6413
6397
6414
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.")
6415
+
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)
8745
8766
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='+')
8746
8767
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)
8768
+
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)
8747
8769
advparser.add_argument("--ignoremissing", help="Ignores all missing non-essential files, just skipping them instead.", action='store_true')
8748
8770
advparser.add_argument("--chatcompletionsadapter", metavar=('[filename]'), help="Select an optional ChatCompletions Adapter JSON file to force custom instruct tags.", default="AutoGuess")
0 commit comments