3 Commits

Author SHA1 Message Date
7793d94514 fix: deepseek rate limit keep-alive
Some checks failed
Deploy static content to Pages / deploy (push) Has been cancelled
2025-06-10 18:20:03 +08:00
24973eabfe fix: structuredClone template
Some checks are pending
Deploy static content to Pages / deploy (push) Waiting to run
2025-06-10 17:13:53 +08:00
6078d8a2c3 remove gitea action 2025-06-10 15:38:43 +08:00
4 changed files with 5 additions and 29 deletions

View File

@@ -1,27 +0,0 @@
name: Build static content
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'npm'
- run: npm install
- run: npm run build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dist-files
path: './dist/'

View File

@@ -338,6 +338,9 @@ class Chat {
console.log("line", line);
try {
const jsonStr = line.slice("data:".length).trim();
if (jsonStr === "keep-alive") { // for deepseek https://api-docs.deepseek.com/quick_start/rate_limit
continue;
}
const json = JSON.parse(jsonStr) as StreamingResponseChunk;
yield json;
} catch (e) {

View File

@@ -548,7 +548,7 @@ function ChatTemplateDropdownList() {
<CommandItem
key={index}
value={t.name}
onSelect={() => handleTemplateSelect(t)}
onSelect={() => handleTemplateSelect(structuredClone(t))}
>
<div className="flex items-center justify-between w-full">
<span>{t.name}</span>

View File

@@ -69,7 +69,7 @@ export function TemplateAttributeDialog({
(filteredStore as any)[typedKey] = chatStore[typedKey];
}
});
onSave(templateName, filteredStore);
onSave(templateName, structuredClone(filteredStore));
};
const toggleAll = (checked: boolean) => {