Files
Luminary/internal/model/ingress_protocol.go
T
renjue 8e82a23555
CI / docker (push) Successful in 2m49s
Split ingress keys into text/image protocols with Replicate model listing.
Add model input defaults (including prompt), workflow model editing, and ingress API docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 23:40:27 +08:00

22 lines
586 B
Go

package model
// IngressKeyProtocol distinguishes OpenAI-compatible text APIs from Replicate-compatible image APIs.
type IngressKeyProtocol string
const (
IngressProtocolText IngressKeyProtocol = "text"
IngressProtocolImage IngressKeyProtocol = "image"
)
func (p IngressKeyProtocol) Valid() bool {
return p == IngressProtocolText || p == IngressProtocolImage
}
// EffectiveProtocol returns text for legacy rows without an explicit protocol.
func (k IngressKey) EffectiveProtocol() IngressKeyProtocol {
if k.Protocol == "" {
return IngressProtocolText
}
return k.Protocol
}