add support for tool call (function call)

This commit is contained in:
2023-11-09 17:04:27 +08:00
parent 4b7d601840
commit 81660d563f
5 changed files with 73 additions and 14 deletions

View File

@@ -60,7 +60,7 @@ const SelectModel = (props: {
const LongInput = (props: {
chatStore: ChatStore;
setChatStore: (cs: ChatStore) => void;
field: "systemMessageContent";
field: "systemMessageContent" | "toolsString";
help: string;
}) => {
return (
@@ -373,6 +373,11 @@ export default (props: {
help="系统消息用于指示ChatGPT的角色和一些前置条件例如“你是一个有帮助的人工智能助理”或者“你是一个专业英语翻译把我的话全部翻译成英语”详情参考 OPEAN AI API 文档"
{...props}
/>
<LongInput
field="toolsString"
help="function call tools, should be valied json format in list"
{...props}
/>
<Input
field="apiKey"
help="OPEN AI API 密钥,请勿泄漏此密钥"