message edit tool json

This commit is contained in:
2023-11-10 19:49:34 +08:00
parent 94f9434fe5
commit dd56f1b94a
2 changed files with 86 additions and 19 deletions

View File

@@ -5,6 +5,7 @@ import models from "./models";
import { TemplateChatStore } from "./chatbox";
import { tr, Tr, langCodeContext, LANG_OPTIONS } from "./translate";
import p from "preact-markdown";
import { isVailedJSON } from "./message";
const TTS_VOICES: string[] = [
"alloy",
@@ -373,6 +374,10 @@ export default (props: {
help="系统消息用于指示ChatGPT的角色和一些前置条件例如“你是一个有帮助的人工智能助理”或者“你是一个专业英语翻译把我的话全部翻译成英语”详情参考 OPEAN AI API 文档"
{...props}
/>
<span>
Valied JSON:{" "}
{isVailedJSON(props.chatStore.toolsString) ? "🆗" : "❌"}
</span>
<LongInput
field="toolsString"
help="function call tools, should be valied json format in list"