Documentation
¶
Index ¶
Constants ¶
View Source
const (
HostCallTransform = "transform"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmbeddingObject ¶
type EmbeddingObject struct {
Object string `json:"object"`
Embedding []float64 `json:"embedding"`
Index int `json:"index"`
}
func (*EmbeddingObject) Marshal ¶
func (r *EmbeddingObject) Marshal() ([]byte, error)
func (*EmbeddingObject) Unmarshal ¶
func (r *EmbeddingObject) Unmarshal(data []byte) error
type EmbeddingsRequest ¶
func (*EmbeddingsRequest) Marshal ¶
func (r *EmbeddingsRequest) Marshal() ([]byte, error)
func (*EmbeddingsRequest) Unmarshal ¶
func (r *EmbeddingsRequest) Unmarshal(data []byte) error
type EmbeddingsResponse ¶
type EmbeddingsResponse struct {
Object string `json:"object"`
Data []EmbeddingObject `json:"data"`
Model string `json:"model"`
Usage interface{} `json:"usage"`
}
func (*EmbeddingsResponse) Marshal ¶
func (r *EmbeddingsResponse) Marshal() ([]byte, error)
func (*EmbeddingsResponse) Unmarshal ¶
func (r *EmbeddingsResponse) Unmarshal(data []byte) error
type ImageGenerationRequest ¶
type ImageGenerationRequest struct {
Model string `json:"model"`
Prompt string `json:"prompt"`
ResponseFormat string `json:"response_format"`
}
func (*ImageGenerationRequest) Marshal ¶
func (r *ImageGenerationRequest) Marshal() ([]byte, error)
func (*ImageGenerationRequest) Unmarshal ¶
func (r *ImageGenerationRequest) Unmarshal(data []byte) error
type ImageGenerationResponse ¶
type ImageGenerationResponse struct {
Created json.Number `json:"created"`
Data []ImageObject `json:"data"`
}
func (*ImageGenerationResponse) Marshal ¶
func (r *ImageGenerationResponse) Marshal() ([]byte, error)
func (*ImageGenerationResponse) Unmarshal ¶
func (r *ImageGenerationResponse) Unmarshal(data []byte) error
type ImageObject ¶
type SpeechToTextRequest ¶
func (*SpeechToTextRequest) Marshal ¶
func (r *SpeechToTextRequest) Marshal() ([]byte, error)
func (*SpeechToTextRequest) Unmarshal ¶
func (r *SpeechToTextRequest) Unmarshal(data []byte) error
type SpeechToTextResponse ¶
type SpeechToTextResponse struct {
Text string `json:"text"`
}
func (*SpeechToTextResponse) Marshal ¶
func (r *SpeechToTextResponse) Marshal() ([]byte, error)
func (*SpeechToTextResponse) Unmarshal ¶
func (r *SpeechToTextResponse) Unmarshal(data []byte) error
type TextToSpeechRequest ¶
type TextToSpeechRequest struct {
Model string `json:"model"`
Input string `json:"input"`
Voice string `json:"voice"`
Format string `json:"response_format"`
}
func (*TextToSpeechRequest) Marshal ¶
func (r *TextToSpeechRequest) Marshal() ([]byte, error)
func (*TextToSpeechRequest) Unmarshal ¶
func (r *TextToSpeechRequest) Unmarshal(data []byte) error
type TextToSpeechResponse ¶
type TextToSpeechResponse struct {
EncodedAudio string `json:"audio"`
}
func (*TextToSpeechResponse) Marshal ¶
func (r *TextToSpeechResponse) Marshal() ([]byte, error)
func (*TextToSpeechResponse) Unmarshal ¶
func (r *TextToSpeechResponse) Unmarshal(data []byte) error
Click to show internal directories.
Click to hide internal directories.