类 URLSource
java.lang.Object
io.agentscope.core.message.Source
io.agentscope.core.message.URLSource
Represents URL-based media content.
This source references media files accessible via URLs, supporting both remote HTTP/HTTPS URLs and local file URLs. This approach is preferred when media files are hosted externally or when file size makes Base64 encoding impractical.
Supported URL formats:
- Remote URLs: https://example.com/image.jpg
- Local files: file:///absolute/path/to/file.jpg
Using URL sources is more efficient for large media files and allows the system to stream content rather than loading everything into memory.
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static URLSource.Builderbuilder()Creates a new builder for constructing URLSource instances.getUrl()Gets the URL that points to the media content.
-
构造器详细资料
-
URLSource
Creates a new URL source for JSON deserialization.- 参数:
url- The URL pointing to the media content- 抛出:
NullPointerException- if url is null
-
-
方法详细资料
-
getUrl
Gets the URL that points to the media content.- 返回:
- The URL as a string
-
builder
Creates a new builder for constructing URLSource instances.- 返回:
- A new builder instance
-