Split ingress keys into text/image protocols with Replicate model listing.
CI / docker (push) Successful in 3m38s
CI / docker (push) Successful in 3m38s
Add model input defaults (including prompt), workflow model editing, ingress API docs, and fix img2img image upload filenames for signed URLs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user