Skip to content

Commit

Permalink
feat: support for VideoPromptMessageContent and AudioPromptMessageCon…
Browse files Browse the repository at this point in the history
…tent
  • Loading branch information
Yeuoly committed Dec 4, 2024
1 parent 94f176b commit 377973d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/types/entities/model_entities/llm.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ type PromptMessageContentType string
const (
PROMPT_MESSAGE_CONTENT_TYPE_TEXT PromptMessageContentType = "text"
PROMPT_MESSAGE_CONTENT_TYPE_IMAGE PromptMessageContentType = "image"
PROMPT_MESSAGE_CONTENT_TYPE_AUDIO PromptMessageContentType = "audio"
PROMPT_MESSAGE_CONTENT_TYPE_VIDEO PromptMessageContentType = "video"
PROMPT_MESSAGE_CONTENT_TYPE_DOCUMENT PromptMessageContentType = "document"
)

Expand All @@ -87,6 +89,8 @@ func isPromptMessageContentType(fl validator.FieldLevel) bool {
switch value {
case string(PROMPT_MESSAGE_CONTENT_TYPE_TEXT),
string(PROMPT_MESSAGE_CONTENT_TYPE_IMAGE),
string(PROMPT_MESSAGE_CONTENT_TYPE_AUDIO),
string(PROMPT_MESSAGE_CONTENT_TYPE_VIDEO),
string(PROMPT_MESSAGE_CONTENT_TYPE_DOCUMENT):
return true
}
Expand All @@ -97,6 +101,7 @@ type PromptMessageContent struct {
Type PromptMessageContentType `json:"type" validate:"required,prompt_message_content_type"`
Data string `json:"data" validate:"required"`
EncodeFormat string `json:"encode_format"`
Format string `json:"format"`
MimeType string `json:"mime_type"`
}

Expand Down

0 comments on commit 377973d

Please sign in to comment.