mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 09:34:37 +00:00
fix broken template, updated lite
This commit is contained in:
parent
01d5175654
commit
b7fc8e644a
2 changed files with 16 additions and 2 deletions
12
klite.embd
12
klite.embd
|
@ -13077,7 +13077,11 @@ Current version indicated by LITEVER below.
|
||||||
{
|
{
|
||||||
found = gentxt.indexOf(st2);
|
found = gentxt.indexOf(st2);
|
||||||
splitresponse = [];
|
splitresponse = [];
|
||||||
if (found != -1) //if found, truncate to it
|
if(found == 0)
|
||||||
|
{
|
||||||
|
gentxt = gentxt.slice(st2.length);
|
||||||
|
}
|
||||||
|
else if (found != -1) //if found, truncate to it
|
||||||
{
|
{
|
||||||
splitresponse = gentxt.split(st2);
|
splitresponse = gentxt.split(st2);
|
||||||
gentxt = splitresponse[0];
|
gentxt = splitresponse[0];
|
||||||
|
@ -13087,7 +13091,11 @@ Current version indicated by LITEVER below.
|
||||||
{
|
{
|
||||||
found = gentxt.indexOf(et2);
|
found = gentxt.indexOf(et2);
|
||||||
splitresponse = [];
|
splitresponse = [];
|
||||||
if (found != -1) //if found, truncate to it
|
if(found == 0)
|
||||||
|
{
|
||||||
|
gentxt = gentxt.slice(et2.length);
|
||||||
|
}
|
||||||
|
else if (found != -1) //if found, truncate to it
|
||||||
{
|
{
|
||||||
splitresponse = gentxt.split(et2);
|
splitresponse = gentxt.split(et2);
|
||||||
gentxt = splitresponse[0];
|
gentxt = splitresponse[0];
|
||||||
|
|
|
@ -3690,6 +3690,12 @@ def main(launch_args,start_server=True):
|
||||||
canload = True
|
canload = True
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print(ex)
|
print(ex)
|
||||||
|
elif isinstance(args.chatcompletionsadapter, dict):
|
||||||
|
try:
|
||||||
|
chatcompl_adapter = json.loads(json.dumps(args.chatcompletionsadapter))
|
||||||
|
canload = True
|
||||||
|
except Exception as ex:
|
||||||
|
print(ex)
|
||||||
if canload:
|
if canload:
|
||||||
print(f"Chat Completions Adapter Loaded")
|
print(f"Chat Completions Adapter Loaded")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue