gpt-3.5-turbo-0301· OpenAI
WildChat-4.8M (AI2)
使用uniapp提供的chooseImage函数来选择图片。选择完后,可以使用uni.getImageInfo函数获取图片信息,然后使用uni.compressImage函数压缩…
- User
使用uniapp提供的chooseImage函数来选择图片。选择完后,可以使用uni.getImageInfo函数获取图片信息,然后使用uni.compressImage函数压缩图片,并将其转为base64格式。
- Assistant
示例代码如下:
code// 选择图片并获取图片信息 uni.chooseImage({ count: 1, success: function(res) { uni.getImageInfo({ src: res.tempFilePaths[0], success: function(info) { // 压缩图片为base64格式 uni.compressImage({ src: res.tempFilePaths[0], quality: 80, success: function(compressedRes) { uni.getFileSystemManager().readFile({ filePath: compressedRes.tempFilePath, encoding: 'base64', success: function(base64Res) { console.log(base64Res.data) } }) } }) } }) } })说明:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.