ImageDescriptionCopilot
ImageDescriptionCopilot
概述
ImageDescriptionCopilot 是 Aspose.PDF FOSS for Go 中的类型。
ImageDescriptionCopilot 使用视觉模型描述图像。
此类型提供 2 个方法,用于在 Go 程序中处理 ImageDescriptionCopilot 对象。可用的方法包括:Describe、FillAltTexts。在安装 Aspose.PDF FOSS for Go 包后,所有公共成员对任何 Go 应用程序均可访问。
方法
| 签名 | 描述 |
|---|---|
Describe(ctx: context.Context, img: image.Image) → (string, error) | Describe 返回 img 的简短自然语言描述,适合作为替代文本。 |
FillAltTexts(ctx: context.Context, doc: *pdf.Document) → (int, error) | FillAltTexts 在标记文档中查找所有缺少替代文本的 /Figure,使用视觉模型为其图像生成描述,并将该描述设置为该图形的 /Alt — 将 ValidatePDFUA 的 UA_FIGURE_NO_ALT 发现转化为一次调用的修复。 |