Note: The gemini-pro-vision model (for text-and-image input) is not yet optimized for multi-turn conversations. Make sure to use gemini-pro and text-only input for chat use cases.

This commit is contained in:
ikechan8370 2023-12-15 20:26:05 +08:00
parent 4dc5d6fe77
commit 22dcb0405b
5 changed files with 185 additions and 111 deletions

View file

@ -19,6 +19,9 @@ export class SendPictureTool extends AbstractTool {
func = async function (opt, e) {
let { urlOfPicture, targetGroupIdOrQQNumber } = opt
if (typeof urlOfPicture === 'object') {
urlOfPicture = urlOfPicture.join(' ')
}
const defaultTarget = e.isGroup ? e.group_id : e.sender.user_id
const target = isNaN(targetGroupIdOrQQNumber) || !targetGroupIdOrQQNumber
? defaultTarget