claude support function call

This commit is contained in:
lloydzhou
2024-09-02 21:45:47 +08:00
parent 877668b629
commit 801b62543a
6 changed files with 145 additions and 112 deletions

View File

@@ -66,6 +66,7 @@ import {
getMessageImages,
isVisionModel,
isDalle3,
showPlugins,
} from "../utils";
import { uploadImage as uploadImageRemote } from "@/app/utils/chat";
@@ -741,12 +742,14 @@ export function ChatActions(props: {
value: ArtifactsPlugin.Artifacts as string,
},
].concat(
pluginStore.getAll().map((item) => ({
// @ts-ignore
title: `${item?.title}@${item?.version}`,
// @ts-ignore
value: item?.id,
})),
showPlugins(currentProviderName, currentModel)
? pluginStore.getAll().map((item) => ({
// @ts-ignore
title: `${item?.title}@${item?.version}`,
// @ts-ignore
value: item?.id,
}))
: [],
)}
onClose={() => setShowPluginSelector(false)}
onSelection={(s) => {