feat: add DingTalk picture agent QA
This commit is contained in:
@@ -15,6 +15,27 @@ const (
|
||||
|
||||
var ErrTurnInProgress = errors.New("turn is already processing")
|
||||
|
||||
// ImageInput contains the image data for a QA request. The DataURI is a
|
||||
// full data: URI (e.g. "data:image/png;base64,...") and must never be
|
||||
// persisted to the audit log.
|
||||
type ImageInput struct {
|
||||
DataURI string
|
||||
MIMEType string
|
||||
SizeBytes int64
|
||||
Width int
|
||||
Height int
|
||||
}
|
||||
|
||||
// MediaAudit records metadata about media in a turn for audit purposes.
|
||||
// It must never contain DataURI, download codes, or URLs.
|
||||
type MediaAudit struct {
|
||||
Type string `json:"type"` // "image"
|
||||
MIMEType string `json:"mime_type"`
|
||||
SizeBytes int64 `json:"size_bytes"`
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
}
|
||||
|
||||
type QARequest struct {
|
||||
TenantKey string
|
||||
Channel string
|
||||
@@ -24,6 +45,7 @@ type QARequest struct {
|
||||
ExternalMessageID string
|
||||
SenderName string
|
||||
Query string
|
||||
Images []ImageInput
|
||||
}
|
||||
|
||||
type Reference struct {
|
||||
@@ -65,6 +87,7 @@ type Turn struct {
|
||||
Question string
|
||||
Answer string
|
||||
References []Reference
|
||||
Media []MediaAudit
|
||||
Status string
|
||||
ErrorMessage string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user