Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrImageNotFound = errors.New("image not found") ErrImageExpired = errors.New("image expired") )
Functions ¶
This section is empty.
Types ¶
type HyperbolicImage ¶
type HyperbolicImage struct {
Index int `json:"index"`
Image string `json:"image"`
RandomSeed string `json:"random_seed"`
}
HyperbolicImage represents a generated image in the Hyperbolic API response
type HyperbolicRequest ¶
type HyperbolicRequest struct {
ModelName string `json:"model_name"`
Prompt string `json:"prompt"`
Height int `json:"height"`
Width int `json:"width"`
Backend string `json:"backend"`
}
HyperbolicRequest represents a Hyperbolic image generation request
type HyperbolicResponse ¶
type HyperbolicResponse struct {
Images []HyperbolicImage `json:"images"`
InferenceTime float64 `json:"inference_time"`
}
HyperbolicResponse represents a Hyperbolic API response
type ImageManager ¶
type ImageManager struct {
// contains filtered or unexported fields
}
func NewImageManager ¶
func (*ImageManager) StoreImageWithPrompt ¶
func (manager *ImageManager) StoreImageWithPrompt(prompt string, imageData []byte) (string, error)
type OpenAIImage ¶
type OpenAIRequest ¶
type OpenAIRequest struct {
Model string `json:"model"`
Prompt string `json:"prompt"`
N *int `json:"n,omitempty"`
Size *string `json:"size,omitempty"`
ResponseFormat *string `json:"response_format,omitempty"`
}
OpenAIRequest represents an OpenAI image generation request
type OpenAIResponse ¶
type OpenAIResponse struct {
Created int64 `json:"created"`
Data []OpenAIImage `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.