mirror of
https://github.com/hanzoai/dashscope-go-sdk.git
synced 2026-09-30 21:39:25 +00:00
19 lines
494 B
Go
19 lines
494 B
Go
package qwen
|
|
|
|
// qwen(text-generation) and qwen-vl(multi-modal) have different data format
|
|
// so define generic interfaces for them.
|
|
type IQwenContent interface {
|
|
*TextContent | *VLContentList | *AudioContentList
|
|
IQwenContentMethods
|
|
}
|
|
|
|
// TODO: langchaingo 中有使用这个 interface, 稍后看看是否需要重新设计.
|
|
type IQwenContentMethods interface {
|
|
ToBytes() []byte
|
|
ToString() string
|
|
SetText(text string)
|
|
AppendText(text string)
|
|
SetImage(url string)
|
|
SetAudio(url string)
|
|
}
|