For privacy reasons, your Access key will be hidden after you reload the page.
+
For privacy reasons, your Secret key will be hidden after you reload the page.
diff --git a/public/locales/lang.json b/public/locales/lang.json
index 9ab68837f..8c12eef92 100644
--- a/public/locales/lang.json
+++ b/public/locales/lang.json
@@ -14,3 +14,4 @@
{ "lang": "uk-ua", "display": "Yкраїнська (Ukrainian)" },
{ "lang": "vi-vn", "display": "Tiếng Việt (Vietnamese)" }
]
+
diff --git a/public/locales/zh-cn.json b/public/locales/zh-cn.json
index 96589e6dd..ce1d8fa65 100644
--- a/public/locales/zh-cn.json
+++ b/public/locales/zh-cn.json
@@ -1,555 +1,3 @@
-{
- "UI Language": "语言",
- "clickslidertips": "点击滑块右侧数字可手动输入",
- "kobldpresets": "Kobold 预设",
- "guikoboldaisettings": "KoboldAI GUI 设置",
- "novelaipreserts": "NovelAI 预设",
- "default": "默认",
- "openaipresets": "OpenAI 预设",
- "text gen webio(ooba) presets": "Text generation web UI 预设",
- "response legth(tokens)": "响应长度(Tokens)",
- "select": "选择 ",
- "context size(tokens)": "上下文大小(Tokens)",
- "unlocked": "解锁",
- "Only select models support context sizes greater than 4096 tokens. Increase only if you know what you're doing.": "只有在选定的模型支持大于 4096 个Token时可以选择启用。在启用该选项时,你应该知道自己在做什么。",
- "rep.pen": "重复惩罚",
- "rep.pen range": "重复惩罚范围",
- "temperature": "温度",
- "Encoder Rep. Pen.": "编码器重复惩罚",
- "No Repeat Ngram Size": "不重复N元语法大小",
- "Min Length": "最小长度",
- "OpenAI Reverse Proxy": "OpenAI API 反向代理",
- "Alternative server URL (leave empty to use the default value).": "自定义 OpenAI API 的反向代理地址 (留空时使用 OpenAI 默认服务器)。",
- "Remove your real OAI API Key from the API panel BEFORE typing anything into this box": "在输入内容之前,从 API 面板中删除 OpenAI API 密钥",
- "We cannot provide support for problems encountered while using an unofficial OpenAI proxy": "我们无法为使用自定义 OpenAI API 反向代理时遇到的问题提供支持",
- "Legacy Streaming Processing": "传统流式处理",
- "Enable this if the streaming doesn't work with your proxy": "如果流式回复与您的代理不兼容,请启用此功能",
- "Context Size (tokens)": "上下文大小(Tokens)",
- "Max Response Length (tokens)": "最大响应长度(Tokens)",
- "Temperature": "温度",
- "Frequency Penalty": "频率惩罚",
- "Presence Penalty": "存在惩罚",
- "Top-p": "Top P",
- "Display bot response text chunks as they are generated": "显示机器人生成的响应文本块",
- "Top A": "Top A",
- "Typical Sampling": "典型采样",
- "Tail Free Sampling": "无尾采样",
- "Rep. Pen. Slope": "重复惩罚梯度",
- "Single-line mode": "单行模式",
- "Top K": "Top-K",
- "Top P": "Top-P",
- "Typical P": "典型 P",
- "Do Sample": "样本测试",
- "Add BOS Token": "添加 BOS Token",
- "Add the bos_token to the beginning of prompts. Disabling this can make the replies more creative.": "在提示的开头添加 bos_token,禁用此功能可以让回复更加创造性。",
- "Ban EOS Token": "禁止 EOS Token",
- "Ban the eos_token. This forces the model to never end the generation prematurely": "禁止 EOS Token,这会迫使模型不会过早结束生成。",
- "Skip Special Tokens": "跳过特殊 Tokens",
- "Beam search": "Beam 搜索",
- "Number of Beams": "Beams 的数量",
- "Length Penalty": "长度惩罚",
- "Early Stopping": "提前终止",
- "Contrastive search": "对比搜索",
- "Penalty Alpha": "惩罚系数",
- "Seed": "随机种子",
- "Inserts jailbreak as a last system message.": "插入越狱作为最后一个系统消息",
- "This tells the AI to ignore its usual content restrictions.": "这告诉人工智能忽略其通常的内容限制",
- "NSFW Encouraged": "NSFW鼓励",
- "Tell the AI that NSFW is allowed.": "告诉人工智能,NSFW 是允许的。",
- "NSFW Prioritized": "NSFW 优先",
- "NSFW prompt text goes first in the prompt to emphasize its effect.": "NSFW 提示文本排在提示的顶部,以强调其效果",
- "Streaming": "流式生成",
- "Display the response bit by bit as it is generated.": "在生成响应时逐字显示。",
- "When this is off, responses will be displayed all at once when they are complete.": "关闭此选项后,响应将在全部完成后立即显示。",
- "Generate only one line per request (KoboldAI only, ignored by KoboldCpp).": "每个请求仅生成一行(仅限 KoboldAI,被 KoboldCpp 忽略)。",
- "Ban the End-of-Sequence (EOS) token (with KoboldCpp, and possibly also other tokens with KoboldAI).": "禁止序列结束 (EOS) token(使用 KoboldCpp,也可能使用 KoboldAI 禁止其他 token)。",
- "Good for story writing, but should not be used for chat and instruct mode.": "适合故事写作,但不应用于聊天和指导模式。",
- "Enhance Definitions": "增强定义",
- "Use OAI knowledge base to enhance definitions for public figures and known fictional characters": "使用 OpenAI 知识库增强公众人物和已知虚构人物的定义",
- "Wrap in Quotes": "用引号包裹",
- "Wrap entire user message in quotes before sending.": "在发送之前将整个用户消息包裹在引号中,",
- "Leave off if you use quotes manually for speech.": "如果您手动使用引号表示言论,请省略。",
- "Main prompt": "主提示",
- "The main prompt used to set the model behavior": "用于设置模型行为的主要提示",
- "NSFW prompt": "NSFW 提示",
- "Prompt that is used when the NSFW toggle is on": "NSFW 打开时使用的提示",
- "Jailbreak prompt": "越狱提示",
- "Prompt that is used when the Jailbreak toggle is on": "越狱开关打开时使用的提示",
- "Impersonation prompt": "扮演提示",
- "Prompt that is used for Impersonation function": "用于扮演功能的提示",
- "Logit Bias": "对数偏置",
- "Helps to ban or reenforce the usage of certain words": "有助于禁止或加强某些单词的使用",
- "View / Edit bias preset": "查看/编辑偏置预设",
- "Add bias entry": "添加偏置条目",
- "Jailbreak activation message": "越狱激活消息",
- "Message to send when auto-jailbreak is on.": "自动越狱开启时要发送的消息。",
- "Jailbreak confirmation reply": "越狱确认回复",
- "Bot must send this back to confirm jailbreak": "机器人必须将其发回以确认越狱",
- "Character Note": "人物注释",
- "Influences bot behavior in its responses": "影响机器人响应中的行为",
- "API": "API",
- "KoboldAI": "KoboldAI",
- "Use Horde": "使用 Horde",
- "API url": "API 地址",
- "Register a Horde account for faster queue times": "注册帐户以加快排队时间",
- "Learn how to contribute your idle GPU cycles to the Hord": "学习如何将闲置的显卡计算资源贡献给Hord",
- "Adjust context size to worker capabilities": "根据辅助角色功能调整上下文大小",
- "Adjust response length to worker capabilities": "根据辅助角色功能调整响应长度",
- "API key": "API 密钥",
- "Register": "注册",
- "For privacy reasons": "出于隐私原因,您的 API 密钥将在您重新加载页面后隐藏",
- "Model": "模型",
- "Hold Control / Command key to select multiple models.": "按住控制/命令键选择多个模型。",
- "Horde models not loaded": "未加载 Horde 模型。",
- "Not connected": "未连接",
- "Novel API key": "NovelAI API 密钥",
- "Follow": "跟随",
- "these directions": " 这篇指南 ",
- "to get your NovelAI API key.": "以获取您的 NovelAI API 密钥。",
- "Enter it in the box below": "将其输入到下面的输入框中",
- "Novel AI Model": "NovelAI 模型",
- "No connection": "无连接",
- "oobabooga/text-generation-webui": "",
- "Make sure you run it with": "确保启动时包含 --api 参数",
- "Blocking API url": "阻塞式 API 地址",
- "Streaming API url": "流式传输 API 地址",
- "to get your OpenAI API key.": "获取您的 OpenAI API 密钥。",
- "OpenAI Model": "OpenAI模型",
- "View API Usage Metrics": "查看 API 使用情况",
- "Bot": "Bot",
- "Connect to the API": "连接到 API",
- "Auto-connect to Last Server": "自动连接到最后设置的 API 服务器",
- "View hidden API keys": "查看隐藏的 API 密钥",
- "Advanced Formatting": "高级格式化",
- "AutoFormat Overrides": "覆盖自动格式化",
- "Disable description formatting": "禁用描述格式",
- "Disable personality formatting": "禁用人设格式",
- "Disable scenario formatting": "禁用场景格式",
- "Disable example chats formatting": "禁用聊天示例格式",
- "Disable chat start formatting": "禁用聊天开始格式",
- "Custom Chat Separator": "自定义聊天分隔符",
- "Instruct Mode": "指示模式",
- "Enabled": "启用",
- "Wrap Sequences with Newline": "用换行符换行序列",
- "Include Names": "包括名称",
- "System Prompt": "系统提示",
- "Instruct Mode Sequences": "指示模式序列",
- "Input Sequence": "输入序列",
- "Output Sequence": "输出序列",
- "First Output Sequence": "第一个输出序列",
- "Last Output Sequence": "最后输出序列",
- "System Sequence Prefix": "系统序列前缀",
- "System Sequence Suffix": "系统序列后缀",
- "Stop Sequence": "停止序列",
- "Context Formatting": "上下文格式",
- "Tokenizer": "Tokenizer",
- "None / Estimated": "无/估计",
- "Sentencepiece (LLaMA)": "Sentencepiece (LLaMA)",
- "Token Padding": "Token 填充",
- "Always add character's name to prompt": "始终将角色名称添加到提示中",
- "Keep Example Messages in Prompt": "在提示中保留示例消息",
- "Remove Empty New Lines from Output": "从输出中删除空的新行",
- "Disabled for all models": "对所有模型禁用",
- "Automatic (based on model name)": "自动(基于模型名称)",
- "Enabled for all models": "对所有模型启用",
- "Anchors Order": "锚点顺序",
- "Character then Style": "字符然后样式",
- "Style then Character": "样式然后字符",
- "Character Anchor": "字符锚点",
- "Style Anchor": "样式锚点",
- "Scan Depth": "扫描深度",
- "depth": "深度",
- "Token Budget": "Token 预算",
- "budget": "预算",
- "Recursive scanning": "递归扫描",
- "None": "没有",
- "User Settings": "聊天窗口设置",
- "UI Customization": "聊天窗口自定义",
- "Avatar Style": "头像风格",
- "Circle": "圆形",
- "Rectangle": "长方形",
- "Chat Style": "聊天窗口样式:",
- "Default": "默认",
- "Bubbles": "气泡",
- "Chat Width (PC)": "聊天窗口宽度(电脑):",
- "No Blur Effect": "关闭模糊效果",
- "No Text Shadows": "关闭文字阴影",
- "Waifu Mode": "♡ 老 婆 模 式 ♡",
- "Message Timer": "消息计时器",
- "Characters Hotswap": "角色热插拔",
- "Movable UI Panels": "可移动的UI面板",
- "Reset Panels": "重置面板",
- "UI Colors": "UI颜色",
- "Main Text": "正文",
- "Italics Text": "斜体文字",
- "Quote Text": "引用文字",
- "Shadow Color": "阴影颜色",
- "FastUI BG": "快速UI背景",
- "Blur Tint": "模糊色调",
- "Font Scale": "字体缩放",
- "Blur Strength": "模糊强度",
- "Text Shadow Width": "文字阴影宽度",
- "UI Theme Preset": "UI主题预设",
- "Power User Options": "高级用户选项",
- "Swipes": "滑动",
- "Background Sound Only": "仅背景声音",
- "Auto-load Last Chat": "自动加载上次聊天",
- "Auto-save Message Edits": "自动保存已编辑的消息",
- "Auto-fix Markdown": "自动修复 Markdown 格式",
- "Allow {{char}}: in bot messages": "允许 {{char}}:在机器人消息中",
- "Allow {{user}}: in bot messages": "允许 {{user}}:在机器人消息中",
- "Auto-scroll Chat": "自动滚动聊天界面",
- "Render Formulas": "渲染公式",
- "Send on Enter": "按下回车键发送",
- "Always disabled": "始终禁用",
- "Automatic (desktop)": "自动(电脑)",
- "Always enabled": "始终启用",
- "Name": "用户名称",
- "Your Avatar": "用户头像",
- "Extensions API:": "扩展API:",
- "SillyTavern-extras": "SillyTavern 扩展",
- "Auto-connect": "自动连接",
- "Active extensions": "启用扩展",
- "Extension settings": "扩展设置",
- "Description": "描述",
- "First message": "第一条消息",
- "Group Controls": "群组控制",
- "Group reply strategy": "群组回复策略",
- "Natural order": "自然顺序",
- "List order": "列表顺序",
- "Allow self responses": "允许自我响应",
- "Auto Mode": "自动模式",
- "Add Members": "添加成员",
- "Current Members": "现有成员",
- "text": "文本",
- "Delete": "删除",
- "Cancel": "取消",
- "Advanced Defininitions": "高级定义",
- "Personality summary": "人设总结",
- "A brief description of the personality": "人设的简要描述",
- "Scenario": "场景",
- "Circumstances and context of the dialogue": "对话的情况和背景",
- "Talkativeness": "回复频率",
- "How often the chracter speaks in": "说话频率",
- "group chats!": "群聊!",
- "Shy": "羞涩 ",
- "Normal": "正常",
- "Chatty": "健谈",
- "Examples of dialogue": "对话示例",
- "Forms a personality more clearly": "更清晰地形成人设",
- "Save": "保存",
- "World Info Editor": "世界背景编辑器",
- "New Entry": "新条目",
- "Export": "导出",
- "Delete World": "删除文本",
- "Chat History": "聊天记录",
- "Group Chat Scenario Override": "群聊场景覆盖",
- "All group members will use the following scenario text instead of what is specified in their character cards.": "所有群组成员都将使用以下场景文本,而不是其角色卡中指定的内容。",
- "Keywords": "关键字",
- "Separate with commas": "用逗号分隔",
- "Secondary Required Keywords": "次要必填关键字",
- "Content": "内容",
- "What this keyword should mean to the AI": "这个关键词对 AI 意味着什么",
- "Memo/Note": "笔记",
- "Not sent to AI": "未发送到 AI",
- "Constant": "常数 ",
- "Selective": "选择",
- "Before Char": "在Char之前",
- "After Char": "在Char之后",
- "Insertion Order": "插入顺序",
- "Tokens:": "Tokens",
- "Disable": "禁用",
- "${characterName}": "${角色名}",
- "CHAR": "角色",
- "is typing": "正在输入...",
- "Back to parent chat": "返回聊天",
- "Save bookmark": "保存书签",
- "Convert to group": "转换为群组",
- "Start new chat": "开始新聊天",
- "View past chats": "查看过去的聊天",
- "Delete messages": "删除消息",
- "Impersonate": "冒充",
- "Regenerate": "重新生成",
- "PNG": "PNG",
- "JSON": "JSON",
- "presets": "预设",
- "Message Sound": "AI 消息提示音",
- "Author's Note": "作者注释",
- "Send Jailbreak": "发送越狱",
- "Replace empty message": "替换空消息",
- "Send this text instead of nothing when the text box is empty.": "当文本框中为空时将会发送此文本,而不是空白消息",
- "NSFW avoidance prompt": "NSFW 避免提示",
- "Prompt that is used when the NSFW toggle is off": "当 NSFW 切换关闭时使用的提示",
- "Advanced prompt bits": "高级提示",
- "World Info format template": "世界背景格式模板",
- "Wraps activated World Info entries before inserting into the prompt. Use {0} to mark a place where the content is inserted.": "在插入提示之前,包装已激活的世界背景条目。使用 {0} 来标记内容插入的位置。",
- "Unrestricted maximum value for the context slider": "上下文滑块的无限制最大值",
- "Chat Completion Source": "聊天补全源",
- "Avoid sending sensitive information to the Horde.": "避免向 Horde 发送敏感信息",
- "Review the Privacy statement": "查看隐私声明",
- "Learn how to contribute your idel GPU cycles to the Horde": "学习如何将闲置的显卡计算资源贡献给Horde",
- "Trusted workers only": "仅限可信赖的 Workers",
- "For privacy reasons, your API key will be hidden after you reload the page.": "出于隐私原因,重新加载页面后,您的 API 密钥将被隐藏。",
- "-- Horde models not loaded --": "Horde 模型未加载",
- "Example: http://127.0.0.1:5000/api ": "示例: http://127.0.0.1:5000/api",
- "No connection...": "没有连接",
- "Get your NovelAI API Key": "获取您的 NovelAI API 密钥",
- "KoboldAI Horde": "KoboldAI Horde",
- "Text Gen WebUI (ooba)": "Text Gen WebUI (ooba)",
- "NovelAI": "NovelAI",
- "Chat Completion (OpenAI, Claude, Window/OpenRouter, Scale)": "Chat Completion (OpenAI, Claude, Window/OpenRouter, Scale)",
- "OpenAI API key": "OpenAI API 密钥",
- "Trim spaces": "修剪空格",
- "Trim Incomplete Sentences": "修剪不完整的句子",
- "Include Newline": "包括换行",
- "Non-markdown strings": "非markdown字符串",
- "Replace Macro in Sequences": "替换序列中的宏",
- "Presets": "预设",
- "Separator": "分隔符",
- "Start Reply With": "回复前缀",
- "Show reply prefix in chat": "在聊天中显示回复前缀",
- "Worlds/Lorebooks": "世界/Lorebooks",
- "Active World(s)": "激活的世界",
- "Character Lore Insertion Strategy": "角色背景插入策略",
- "Sorted Evenly": "均匀排序",
- "Character Lore First": "角色背景优先",
- "Global Lore First": "全局背景优先",
- "-- World Info not found --": "-- 世界背景未找到 --",
- "Recursive Scan": "归递扫描",
- "Case Sensitive": "区分大小写",
- "Match whole words": "匹配整个单词",
- "World/Lore Editor": "世界/Lore 编辑",
- "--- None ---": "--- 全无 ---",
- "Comma seperated (ignored if empty)": "逗号分隔 (如果为空则忽略)",
- "Use Probability": "使用概率",
- "Exclude from recursion": "从递归中排除",
- "Position:": "插入位置:",
- "Before Char Defs": "角色定义之前",
- "After Char Defs": "角色定义之后",
- "Before AN": "作者注释之前",
- "After AN": "作者注释之后",
- "Order:": "排序",
- "Probability:": "概率",
- "Delete Entry": "删除条目",
- "User Message Blur Tint": "用户消息模糊颜色",
- "AI Message Blur Tint": "AI 消息模糊颜色",
- "Chat Style:": "聊天窗口样式:",
- "Chat Width (PC):": "聊天窗口宽度 (电脑):",
- "Chat Timestamps": "聊天时间戳",
- "Message IDs": "消息 ID",
- "Prefer Character Card Prompt": "首选角色卡提示",
- "Prefer Character Card Jailbreak": "首选角色卡越狱",
- "Press Send to continue": "按下发送按钮继续",
- "Log prompts to console": "将提示记录到控制台",
- "Never resize avatars": "不要调整头像大小",
- "Show avatar filenames": "显示头像文件名",
- "Import Card Tags": "导入卡片标签",
- "Confirm message deletion": "确认删除消息",
- "Spoiler Free Mode": "无剧透模式",
- "Auto-swipe": "自动右滑生成",
- "Minimum generated message length": "消息生成的最小长度",
- "Blacklisted words": "黑名单词汇",
- "Blacklisted word count to swipe": "自动滑动触发的累计黑名单词汇数",
- "Reload Chat": "重新加载聊天窗口",
- "Not Connected": "未连接",
- "Persona Management": "用户角色设置",
- "Persona Description": "用户角色描述",
- "In Story String / Chat Completion: Before Character Card": "在故事字符串 / 聊天补全中: 角色卡之前",
- "In Story String / Chat Completion: After Character Card": "在故事字符串 / 聊天补全中: 角色卡之后",
- "Top of Author's Note": "作者注释之前",
- "Bottom of Author's Note": "作者注释之后",
- "How do I use this?": "用户角色设置说明",
- "More...": "更多...",
- "Link to World Info": "链接到世界背景",
- "Import Card Lore": "导入卡片背景",
- "Scenario Override": "场景覆盖",
- "Rename": "重命名",
- "Character Description": "角色描述",
- "Creator's Notes": "创建者的注释",
- "A-Z": "A-Z",
- "Z-A": "Z-A",
- "Newest": "最新",
- "Oldest": "最旧",
- "Favorites": "收藏",
- "Recent": "最近",
- "Most chats": "聊天次数最多",
- "Least chats": "聊天次数最少",
- "Back": "返回",
- "Prompt Overrides (For OpenAI/Claude/Scale APIs, Window/OpenRouter, and Instruct mode)": "提示覆盖(适用于OpenAI/Claude/Scale APIs、Window/OpenRouter和Instruct模式)",
- "Insert {{original}} into either box to include the respective default prompt from system settings.": "将{{original}}插入任意一个框中,即可包含来自系统设置的默认提示。",
- "Main Prompt": "主要提示",
- "Jailbreak": "越狱",
- "Creator's Metadata (Not sent with the AI prompt)": "创建者的元数据(不会与 AI 提示一起发送)",
- "Everything here is optional": "这里的一切都是可选的",
- "Created by": "创建者",
- "Character Version": "角色版本",
- "Tags to Embed": "要嵌入的标签",
- "How often the character speaks in group chats!": "角色在群聊中说话的频率!",
- "Important to set the character's writing style.": "要设置角色的写作风格,它很重要。",
- "ATTENTION!": "注意!",
- "Samplers Order": "采样器顺序",
- "Samplers will be applied in a top-down order. Use with caution.": "采样器将按从上到下的顺序应用。谨慎使用。",
- "Repetition Penalty": "重复惩罚",
- "Epsilon Cutoff": "Epsilon 切断",
- "Eta Cutoff": "Eta 切断",
- "Rep. Pen. Range.": "重复惩罚范围",
- "Rep. Pen. Freq.": "重复频率惩罚",
- "Rep. Pen. Presence": "重复存在惩罚",
- "Enter it in the box below:": "在下面的框中输入:",
- "separate with commas w/o space between": "用逗号分隔,不要空格",
- "Document": "文档",
- "Continue": "继续",
- "Editing:": "正在编辑:",
- "AI reply prefix": "AI回复前缀",
- "Custom Stopping Strings": "自定义停止字符串",
- "JSON serialized array of strings": "字符串的JSON序列化数组",
- "words you dont want generated separated by comma ','": "你不想生成的词汇,用逗号 ',' 分隔",
- "Extensions URL": "扩展URL",
- "API Key": "API密钥",
- "Enter your name": "输入你的名字",
- "Name this character": "给这个角色起个名字",
- "Search / Create Tags": "搜索 / 创建标签",
- "Describe your character's physical and mental traits here.": "在这里描述你的角色的身体和精神特点。",
- "This will be the first message from the character that starts every chat.": "这将是角色开始每个聊天的第一条消息。",
- "Chat Name (Optional)": "聊天名称(可选)",
- "Filter...": "筛选...",
- "Search...": "搜索...",
- "Any contents here will replace the default Main Prompt used for this character. (v2 spec: system_prompt)": "这里的任何内容都将替换用于此角色的默认主要提示。(v2规范:system_prompt)",
- "Any contents here will replace the default Jailbreak Prompt used for this character. (v2 spec: post_history_instructions)": "这里的任何内容都将替换用于此角色的默认越狱提示。 (v2规范:post_history_instructions)",
- "(Botmaker's name / Contact Info)": "(Bot制作者的名字/联系信息)",
- "(If you want to track character versions)": "(如果你想跟踪角色版本)",
- "(Describe the bot, give use tips, or list the chat models it has been tested on. This will be displayed in the character list.)": "(描述机器人,给出使用提示,或列出用它测试过的聊天模型。这将显示在角色列表中)",
- "(Write a comma-separated list of tags)": "(编写逗号分隔的标签列表)",
- "(A brief description of the personality)": "(人设的简要描述)",
- "(Circumstances and context of the interaction)": "(互动的情况和上下文)",
- "(Examples of chat dialog. Begin each example with START on a new line.)": "(聊天对话的示例。每个示例都以新行的START开始)",
- "Injection text (supports parameters)": "注入文本(支持参数)",
- "Injection depth": "注入深度",
- "Type here...": "在此处输入...",
- "Comma separated (required)": "逗号分隔(必需)",
- "Comma separated (ignored if empty)": "逗号分隔(如果为空则被忽略)",
- "What this keyword should mean to the AI, sent verbatim": "这个关键词对AI来说应该是什么意思,逐字递送",
- "Not sent to the AI": "不发送给AI",
- "(This will be the first message from the character that starts every chat)": "(这将是角色开始每个聊天的第一条消息)",
- "Not connected to API!": "未连接到API!",
- "AI Response Configuration": "AI响应配置",
- "AI Configuration panel will stay open": "AI配置面板将保持打开状态",
- "Update current preset": "更新当前预设",
- "Create new preset": "创建新预设",
- "Import preset": "导入预设",
- "Export preset": "导出预设",
- "Delete the preset": "删除该预设",
- "Inserts jailbreak as a last system message": "将越狱插入为最后一个系统消息",
- "NSFW block goes first in the resulting prompt": "在生成的提示中,NSFW部分排在首位",
- "Enables OpenAI completion streaming": "启用OpenAI补全流",
- "Wrap user messages in quotes before sending": "发送前用引号括起用户消息",
- "Restore default prompt": "恢复默认提示",
- "New preset": "新预设",
- "Delete preset": "删除预设",
- "Restore default jailbreak": "恢复默认越狱",
- "Restore default reply": "恢复默认回复",
- "Restore defaul note": "恢复默认注释",
- "API Connections": "API连接",
- "Can help with bad responses by queueing only the approved workers. May slowdown the response time.": "通过只排队已批准的worker来帮助处理不良响应。可能会减慢响应时间。",
- "Clear your API key": "清除你的API密钥",
- "Refresh models": "刷新模型",
- "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "使用OAuth流程获取您的OpenRouter API令牌。您将被重定向到openrouter.ai",
- "Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "通过发送一个短测试消息验证您的API连接。请注意,这将会计入你的使用额度!",
- "Create New": "创建新的",
- "Edit": "编辑",
- "World Info": "世界背景",
- "Locked = World Editor will stay open": "锁定=世界编辑器将保持打开状态",
- "Entries can activate other entries by mentioning their keywords": "条目可以通过提及其关键字来激活其他条目",
- "Lookup for the entry keys in the context will respect the case": "在上下文中查找条目关键词将遵守大小写",
- "If the entry key consists of only one word, it would not be matched as part of other words": "如果条目键仅包含一个词,它将不会被匹配为其他词汇的一部分",
- "Open all Entries": "打开所有条目",
- "Close all Entries": "关闭所有条目",
- "Create": "创建",
- "Import World Info": "导入世界背景",
- "Export World Info": "导出世界背景",
- "Delete World Info": "删除世界背景",
- "Rename World Info": "重命名世界背景",
- "Save changes to a new theme file": "将更改保存到新主题文件中",
- "removes blur and uses alternative background color for divs": "去除模糊并为div使用替代的背景颜色",
- "If checked and the character card contains a prompt override (System Prompt), use that instead.": "如果选中并且角色卡包含提示覆盖(系统提示),请改用该选项。",
- "If checked and the character card contains a jailbreak override (Post History Instruction), use that instead.": "如果选中并且角色卡包含越狱覆盖(发布历史指令),请改用该选项。",
- "AI Response Formatting": "AI 回复格式",
- "Change Background Image": "更改背景图片",
- "Extensions": "扩展",
- "Click to set a new User Name": "点击设置新用户名",
- "Click to lock your selected persona to the current chat. Click again to remove the lock.": "点击将选择的角色锁定到当前聊天。再次单击以解除锁定。",
- "Click to set user name for all messages": "点击为所有消息设置用户名称",
- "Create a dummy persona": "创建一个虚拟个人角色",
- "Character Management": "角色管理",
- "Locked = Character Management panel will stay open": "锁定=角色管理面板将保持打开状态",
- "Select/Create Characters": "选择/创建角色",
- "Token counts may be inaccurate and provided just for reference.": "Token 计数可能不准确,仅供参考。",
- "Click to select a new avatar for this character": "点击选择此角色的新头像",
- "Add to Favorites": "添加到收藏夹",
- "Advanced Definition": "高级定义",
- "Character Lore": "角色背景",
- "Export and Download": "导出并下载",
- "Duplicate Character": "复制角色",
- "Create Character": "创建角色",
- "Delete Character": "删除角色",
- "View all tags": "查看所有标签",
- "Click to set additional greeting messages": "单击设置其他的问候消息",
- "Show / Hide Description and First Message": "显示/隐藏描述和第一条消息",
- "Click to select a new avatar for this group": "单击选择此群组的新头像",
- "Set a group chat scenario": "设置群聊场景",
- "Restore collage avatar": "恢复拼贴头像",
- "Create New Character": "创建新角色",
- "Import Character from File": "从文件中导入角色",
- "Import content from external URL": "从外部URL导入内容",
- "Create New Chat Group": "创建新的聊天群组",
- "Characters sorting order": "角色排序顺序",
- "Add chat injection": "添加聊天中断",
- "Remove injection": "移除中断",
- "Remove": "移除",
- "Select a World Info file for": "为角色选择一个世界背景",
- "Primary Lorebook": "主要的 Lorebook",
- "A selected World Info will be bound to this character as its own Lorebook.": "所选择的世界背景将作为其自己的 Lorebook 绑定到此角色。",
- "When generating an AI reply, it will be combined with the entries from a global World Info selector.": "在生成AI回复时,它将与全局世界背景选择器中的条目结合。",
- "Exporting a character would also export the selected Lorebook file embedded in the JSON data.": "导出角色也会导出嵌入在JSON数据中的 Lorebook 文件。",
- "Additional Lorebooks": "其他 Lorebook",
- "Associate one or more auxillary Lorebooks with this character.": "将一个或多个辅助的 Lorebook 与这个角色关联。",
- "NOTE: These choices are optional and won't be preserved on character export!": "注意:这些选择是可选的,不会在导出角色时保留!",
- "Rename chat file": "重命名聊天文件",
- "Export JSONL chat file": "导出 JSONL 聊天文件",
- "Download chat as plain text document": "将聊天内容下载为纯文本文档",
- "Delete chat file": "删除聊天文件",
- "Delete tag": "删除标签",
- "Translate message": "翻译消息",
- "Generate Image": "生成图片",
- "Narrate": "讲述",
- "Prompt": "提示",
- "Create Bookmark": "创建书签",
- "Copy": "复制",
- "Open bookmark chat": "打开书签聊天",
- "Confirm": "确认",
- "Copy this message": "复制此消息",
- "Delete this message": "删除此消息",
- "Move message up": "将消息上移",
- "Move message down": "将消息下移",
- "Enlarge": "放大",
- "Temporarily disable automatic replies from this character": "暂时禁用此角色的自动回复",
- "Enable automatic replies from this character": "启用此角色的自动回复",
- "Trigger a message from this character": "触发这个角色的一条消息",
- "Move up": "上移",
- "Move down": "下移",
- "View character card": "查看角色卡",
- "Remove from group": "从群组中移除",
- "Add to group": "添加到群组",
- "Add": "添加",
- "Abort request": "取消请求",
- "Send a message": "发送消息",
- "Ask AI to write your message for you": "让 AI 代替你写消息",
- "Continue the last message": "继续上一条消息",
- "Bind user name to that avatar": "将用户名绑定到该头像",
- "Select this as default persona for the new chats.": "将此选择为新聊天的默认角色。",
- "Change persona image": "更改角色形象",
- "Delete persona": "删除角色"
-}
{
"clickslidertips": "单击滑块以手动输入值。",
"kobldpresets": "Kobold 预设",
diff --git a/public/scripts/openai.js b/public/scripts/openai.js
index 51c991cee..290032ee5 100644
--- a/public/scripts/openai.js
+++ b/public/scripts/openai.js
@@ -3929,16 +3929,21 @@ async function onConnectButtonClick(e) {
}
if (oai_settings.chat_completion_source == chat_completion_sources.BEDROCK) {
- const access_key_aws = String($('#access_key_aws').val()).trim();
- const secret_key_aws = String($('#secret_key_aws').val()).trim();
+ const access_key_aws = String($('#api_key_bedrock_access').val()).trim();
+ const secret_key_aws = String($('#api_key_bedrock_secret').val()).trim();
- if (access_key_aws.length > 0 && secret_key_aws.length > 0) {
- await writeSecret(SECRET_KEYS.BEDROCK, [access_key_aws, secret_key_aws]);
+ if (access_key_aws.length) {
+ await writeSecret(SECRET_KEYS.BEDROCK_ACCESS_KEY, access_key_aws);
+ }
+ if (!secret_state[SECRET_KEYS.BEDROCK_ACCESS_KEY]) {
+ console.log('No access key saved for Amazon Bedrock');
+ }
- if (!secret_state[SECRET_KEYS.BEDROCK]) {
- console.log('No secret key saved for Amazon Bedrock');
- return;
- }
+ if (secret_key_aws.length) {
+ await writeSecret(SECRET_KEYS.BEDROCK_SECRET_KEY, secret_key_aws);
+ }
+ if (!secret_state[SECRET_KEYS.BEDROCK_SECRET_KEY]) {
+ console.log('No secret key saved for Amazon Bedrock');
}
}
startStatusLoading();
diff --git a/public/scripts/secrets.js b/public/scripts/secrets.js
index 68b800156..0f6947cf6 100644
--- a/public/scripts/secrets.js
+++ b/public/scripts/secrets.js
@@ -20,7 +20,8 @@ export const SECRET_KEYS = {
DREAMGEN: 'api_key_dreamgen',
CUSTOM: 'api_key_custom',
OOBA: 'api_key_ooba',
- BEDROCK: 'api_key_bedrock',
+ BEDROCK_ACCESS_KEY: 'api_key_bedrock_access',
+ BEDROCK_SECRET_KEY: 'api_key_bedrock_secret',
NOMICAI: 'api_key_nomicai',
KOBOLDCPP: 'api_key_koboldcpp',
LLAMACPP: 'api_key_llamacpp',
@@ -34,7 +35,6 @@ const INPUT_MAP = {
[SECRET_KEYS.NOVEL]: '#api_key_novel',
[SECRET_KEYS.CLAUDE]: '#api_key_claude',
[SECRET_KEYS.OPENROUTER]: '.api_key_openrouter',
- [SECRET_KEYS.OPENROUTER]: '.api_key_openrouter',
[SECRET_KEYS.SCALE]: '#api_key_scale',
[SECRET_KEYS.AI21]: '#api_key_ai21',
[SECRET_KEYS.SCALE_COOKIE]: '#scale_cookie',
@@ -45,7 +45,8 @@ const INPUT_MAP = {
[SECRET_KEYS.CUSTOM]: '#api_key_custom',
[SECRET_KEYS.TOGETHERAI]: '#api_key_togetherai',
[SECRET_KEYS.OOBA]: '#api_key_ooba',
- [SECRET_KEYS.BEDROCK]: '#api_key_bedrock',
+ [SECRET_KEYS.BEDROCK_ACCESS_KEY]: '#api_key_bedrock_access',
+ [SECRET_KEYS.BEDROCK_SECRET_KEY]: '#api_key_bedrock_secret',
[SECRET_KEYS.INFERMATICAI]: '#api_key_infermaticai',
[SECRET_KEYS.DREAMGEN]: '#api_key_dreamgen',
[SECRET_KEYS.NOMICAI]: '#api_key_nomicai',
@@ -63,11 +64,7 @@ async function clearSecret() {
await writeSecret(key, '');
secret_state[key] = false;
updateSecretDisplay();
- $(INPUT_MAP[key]).val('').trigger('input').trigger('input');
- if (key == SECRET_KEYS.BEDROCK) {
- $('#access_key_aws').val('').trigger('input');
- $('#secret_key_aws').val('').trigger('input');
- }
+ $(INPUT_MAP[key]).val('').trigger('input');
$('#main_api').trigger('change');
}
diff --git a/src/bedrock.js b/src/bedrock.js
index 54a5ea0a6..8e43d9948 100644
--- a/src/bedrock.js
+++ b/src/bedrock.js
@@ -8,19 +8,20 @@ const getClient = (function() {
const client = {};
let aksk = '';
return function(region_name) {
- const secrets = readSecret(SECRET_KEYS.BEDROCK);
- const _aksk = secrets[0] + secrets[1] || '';
+ const access_key = readSecret(SECRET_KEYS.BEDROCK_ACCESS_KEY) || '';
+ const secret_key = readSecret(SECRET_KEYS.BEDROCK_SECRET_KEY) || '';
+ const _aksk = access_key + secret_key;
const refresh = _aksk != aksk;
if(! client[region_name] || refresh) {
aksk = _aksk;
const secrets = readSecret(SECRET_KEYS.BEDROCK);
- if (secrets[0] && secrets[1]) {
+ if (access_key && secret_key) {
client[region_name] = new BedrockClient({
region: region_name,
credentials: {
- accessKeyId: secrets[0],
- secretAccessKey: secrets[1]
+ accessKeyId: access_key,
+ secretAccessKey: secret_key
}
});
} else {
@@ -36,18 +37,19 @@ const getRuntimeClient = (function() {
const client = {};
let aksk = '';
return function(region_name) {
- const secrets = readSecret(SECRET_KEYS.BEDROCK);
- const _aksk = secrets[0] + secrets[1] || '';
+ const access_key = readSecret(SECRET_KEYS.BEDROCK_ACCESS_KEY) || '';
+ const secret_key = readSecret(SECRET_KEYS.BEDROCK_SECRET_KEY) || '';
+ const _aksk = access_key + secret_key;
const refresh = _aksk != aksk;
if(! client[region_name] || refresh) {
aksk = _aksk;
- if (secrets[0] && secrets[1]) {
+ if (access_key && secret_key) {
client[region_name] = new BedrockRuntimeClient({
region: region_name,
credentials: {
- accessKeyId: secrets[0],
- secretAccessKey: secrets[1]
+ accessKeyId: access_key,
+ secretAccessKey: secret_key
}
});
} else {
diff --git a/src/endpoints/backends/chat-completions.js b/src/endpoints/backends/chat-completions.js
index 176d24022..b52cbeb51 100644
--- a/src/endpoints/backends/chat-completions.js
+++ b/src/endpoints/backends/chat-completions.js
@@ -692,6 +692,7 @@ router.post('/status', jsonParser, async function (request, response_getstatus_o
let api_url;
let api_key_openai;
let headers;
+ let bedrock_region = 'us-east-1';
if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.OPENAI) {
api_url = new URL(request.body.reverse_proxy || API_OPENAI).toString();
@@ -712,7 +713,7 @@ router.post('/status', jsonParser, async function (request, response_getstatus_o
headers = {};
mergeObjectWithYaml(headers, request.body.custom_include_headers);
} else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.BEDROCK) {
- var bedrock_region = request.body.bedrock_region;
+ bedrock_region = request.body.bedrock_region;
} else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.COHERE) {
api_url = API_COHERE;
api_key_openai = readSecret(SECRET_KEYS.COHERE);
@@ -722,7 +723,6 @@ router.post('/status', jsonParser, async function (request, response_getstatus_o
return response_getstatus_openai.status(400).send({ error: true });
}
- // todo: should check Key or IAM Role permission
if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.BEDROCK) {
try {
let resp = await listTextModels(bedrock_region);
@@ -951,11 +951,6 @@ router.post('/generate', jsonParser, function (request, response) {
bodyParams.logprobs = true;
}
- mergeObjectWithYaml(bodyParams, request.body.custom_include_body);
- mergeObjectWithYaml(headers, request.body.custom_include_headers);
- } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.BEDROCK) {
- console.log(request);
- apiKey = readSecret(SECRET_KEYS.BEDROCK);
mergeObjectWithYaml(bodyParams, request.body.custom_include_body);
mergeObjectWithYaml(headers, request.body.custom_include_headers);
} else {