feat: 增强智能体模型调用兼容能力
- 增加模型流式开关和 HTTP 传输策略配置 - 使用 AgentScope 执行基础连接、流式与 VLM 双阶段验证 - 固定多模态校验图片并统一验证状态展示
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package tech.easyflow.ai.service.support;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
||||
/**
|
||||
* VLM 连接验证专用 PNG 测试。
|
||||
*/
|
||||
public class VlmVerificationImageTest {
|
||||
|
||||
/**
|
||||
* 验证固定资源图片可重复读取并能被标准 PNG 解码器解析。
|
||||
*
|
||||
* @throws Exception 图片解码失败时抛出
|
||||
*/
|
||||
@Test
|
||||
public void pngBytesShouldReturnDeterministicReadableImage() throws Exception {
|
||||
byte[] first = VlmVerificationImage.pngBytes();
|
||||
byte[] second = VlmVerificationImage.pngBytes();
|
||||
BufferedImage image = ImageIO.read(new ByteArrayInputStream(first));
|
||||
|
||||
Assert.assertArrayEquals(first, second);
|
||||
Assert.assertNotNull(image);
|
||||
Assert.assertEquals(480, image.getWidth());
|
||||
Assert.assertEquals(180, image.getHeight());
|
||||
Assert.assertEquals("5839", VlmVerificationImage.VERIFICATION_CODE);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user