feat: add multi-model support

This commit is contained in:
Yidadaa
2023-09-26 00:19:21 +08:00
parent b90dfb48ee
commit 5610f423d0
62 changed files with 1439 additions and 940 deletions

19
app/utils/string.ts Normal file
View File

@@ -0,0 +1,19 @@
export function trimEnd(s: string, end = " ") {
if (end.length === 0) return s;
while (s.endsWith(end)) {
s = s.slice(0, -end.length);
}
return s;
}
export function trimStart(s: string, start = " ") {
if (start.length === 0) return s;
while (s.endsWith(start)) {
s = s.slice(start.length);
}
return s;
}