mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-04-28 03:30:20 +00:00
added 2 more readme images
This commit is contained in:
parent
fe401ca4c2
commit
d99f362513
4 changed files with 86 additions and 3 deletions
|
|
@ -6,6 +6,8 @@ KoboldCpp is an easy-to-use AI text-generation software for GGML and GGUF models
|
|||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
### Features
|
||||
- Single file executable, with no installation required and no external dependencies
|
||||
|
|
|
|||
87
klite.embd
87
klite.embd
|
|
@ -5871,7 +5871,20 @@ Current version indicated by LITEVER below.
|
|||
return `<pre>${cpybtn}<code>${code}</code></pre>`;
|
||||
};
|
||||
const convertMarkdownTableToHtml = (t) => {
|
||||
let hsep = /^[\s]*\|(?:[\s]*[-:]+[-:|\s]*)+\|[\s]*$/gm;let l=/^[\s]*\|(.*)\|[\s]*$/gm,r=t.split(/\r?\n|\r/),e="<table class='tablelines'>";for(let o of r){let hs=o.match(hsep);if(hs){continue;}let d=o.match(l);if(d){let i=d[0].split("|").map(t=>t.trim());e+=`<tr class='tablelines'><td class='tablelines'>${i.join("</td><td class='tablelines'>")}</td></tr>`}}return e+"</table>"
|
||||
let hsep = /^[\s]*\|(?:[\s]*[-:]+[-:|\s]*)+\|[\s]*$/gm;
|
||||
let l = /^[\s]*\|(.*)\|[\s]*$/gm;
|
||||
let r = t.split(/\r?\n|\r/);
|
||||
let outp = "<table class='tablelines'>";
|
||||
for (let o of r) {
|
||||
let hs = o.match(hsep);
|
||||
if (hs) { continue; }
|
||||
let d = o.match(l);
|
||||
if (d) {
|
||||
let i = d[0].split("|").map(t => t.trim());
|
||||
outp += `<tr class='tablelines'><td class='tablelines'>${i.join("</td><td class='tablelines'>")}</td></tr>`
|
||||
}
|
||||
}
|
||||
return outp + "</table>";
|
||||
};
|
||||
const replaceLatex = (input) =>{
|
||||
//all latex patterns except inline tex
|
||||
|
|
@ -5982,7 +5995,7 @@ Current version indicated by LITEVER below.
|
|||
.replace(/~~(\w.*?)~~/gm, "<del>$1</del>")
|
||||
.replace(/\^\^(\w.*?)\^\^/gm, "<ins>$1</ins>")
|
||||
.replace(/\{\{(\w.*?)\}\}/gm, "<mark>$1</mark>")
|
||||
.replace(/^((?:\|[^|\r\n]*[^|\r\n\s]\s*)+\|(?:\r?\n|\r|))+/gm,
|
||||
.replace(/^((?:\|[^|\r\n]*[^|\r\n\s]\s*)+\| {0,2}(?:\r?\n|\r|))+/gm,
|
||||
(matchedTable) => convertMarkdownTableToHtml(matchedTable))
|
||||
.replace(/ \n/g, "\n<br/>");
|
||||
if(append_spcetg)
|
||||
|
|
@ -8694,6 +8707,74 @@ Current version indicated by LITEVER below.
|
|||
* }[]}
|
||||
**/
|
||||
const scenario_sources = [
|
||||
// prompts.forthisfeel.club replaces Aetherroom.club
|
||||
{
|
||||
name: "prompts.forthisfeel.club",
|
||||
urlParam: "aether",
|
||||
inputBox: {
|
||||
text: "Enter prompts.forthisfeel.club prompt URL, or 4-digit prompt number",
|
||||
placeholder: "https://prompts.forthisfeel.club/1234"
|
||||
},
|
||||
extraction: (userInput) => {
|
||||
userInput = userInput.toLowerCase();
|
||||
if (userInput.includes("forthisfeel.club/")) {
|
||||
//is a url, extract the ID
|
||||
userInput = userInput.replace("/api/","/");
|
||||
userInput = userInput.split("forthisfeel.club/")[1];
|
||||
userInput = userInput.split("/")[0];
|
||||
userInput = userInput.split("#")[0];
|
||||
userInput = userInput.split("?")[0];
|
||||
}
|
||||
if(!(userInput!="" && is_numeric(userInput) && userInput>0 && userInput<50000))
|
||||
throw new Error("User input is invalid\n\n Please ensure you have input a valid prompts.forthisfeel.club URL or ID (e.g. https://prompts.forthisfeel.club/1234 or just 1234)");
|
||||
return userInput;
|
||||
},
|
||||
fetch: (userInput) => {
|
||||
return fetch(apply_proxy_url("https://prompts.forthisfeel.club/api/"+userInput,true))
|
||||
.then(x => x.json())
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
temp_scenario =
|
||||
{
|
||||
"title":data.title?data.title:"",
|
||||
"desc":data.description?data.description:"",
|
||||
"opmode":2,
|
||||
"adventure_context_mod":false,
|
||||
"adventure_switch_mode":1,
|
||||
"prompt":data.promptContent?data.promptContent:"",
|
||||
"memory": data.memory?data.memory:"",
|
||||
"authorsnote": data.authorsNote?data.authorsNote:"",
|
||||
"worldinfo": []
|
||||
};
|
||||
if (data.worldInfos)
|
||||
{
|
||||
for (let w = 0; w < data.worldInfos.length; ++w) {
|
||||
let keys = data.worldInfos[w].keys;
|
||||
let entry = data.worldInfos[w].entry;
|
||||
|
||||
let nwi = {
|
||||
"key": (keys ? keys : ""),
|
||||
"keysecondary": "",
|
||||
"keyanti": "",
|
||||
"content": (entry ? entry : ""),
|
||||
"comment": "",
|
||||
"folder": null,
|
||||
"selective": false,
|
||||
"constant": false,
|
||||
"probability":100,
|
||||
"wigroup":"",
|
||||
"widisabled":false
|
||||
};
|
||||
temp_scenario.worldinfo.push(nwi);
|
||||
}
|
||||
}
|
||||
preview_temp_scenario();
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
throw new Error("Error: Selected scenario is invalid.");
|
||||
});
|
||||
}
|
||||
},
|
||||
// Chub.ai
|
||||
{
|
||||
name: "characterhub.org / chub.ai",
|
||||
|
|
@ -8950,7 +9031,7 @@ Current version indicated by LITEVER below.
|
|||
if(scenario_id) loadScenario(scenario_id);
|
||||
else inputBox(
|
||||
scenario_source.inputBox.text,
|
||||
"Import from " + scenario_source.inputBox.name,
|
||||
"Import from " + scenario_source.name,
|
||||
"",
|
||||
scenario_source.inputBox.placeholder,
|
||||
(value) => {
|
||||
|
|
|
|||
BIN
media/preview5.png
Normal file
BIN
media/preview5.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
BIN
media/preview6.png
Normal file
BIN
media/preview6.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Loading…
Add table
Add a link
Reference in a new issue