mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-20 14:28:54 +00:00
API: Add KoboldAI server
Used for interacting with applications that use KoboldAI's API such as horde. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -828,10 +828,14 @@ class ExllamaV2Container:
|
||||
|
||||
return dict(zip_longest(top_tokens, cleaned_values))
|
||||
|
||||
async def generate(self, prompt: str, request_id: str, **kwargs):
|
||||
async def generate(
|
||||
self, prompt: str, request_id: str, abort_event: asyncio.Event = None, **kwargs
|
||||
):
|
||||
"""Generate a response to a prompt"""
|
||||
generations = []
|
||||
async for generation in self.generate_gen(prompt, request_id, **kwargs):
|
||||
async for generation in self.generate_gen(
|
||||
prompt, request_id, abort_event, **kwargs
|
||||
):
|
||||
generations.append(generation)
|
||||
|
||||
joined_generation = {
|
||||
|
||||
Reference in New Issue
Block a user