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:
@@ -74,6 +74,18 @@ func (s *Store) Get(id string) (*model.StoredImage, error) {
|
||||
return &img, nil
|
||||
}
|
||||
|
||||
func (s *Store) ReadContent(id string) ([]byte, *model.StoredImage, error) {
|
||||
img, err := s.Get(id)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
data, err := os.ReadFile(img.LocalPath)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
return data, img, nil
|
||||
}
|
||||
|
||||
func (s *Store) ListByPrediction(predictionID string) ([]model.StoredImage, error) {
|
||||
var imgs []model.StoredImage
|
||||
err := s.db.Where("prediction_id = ?", predictionID).Order("created_at asc").Find(&imgs).Error
|
||||
|
||||
Reference in New Issue
Block a user