transform

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

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

type EmbeddingsRequest struct {
	Input string `json:"input"`
	Model string `json:"model"`
}

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 ImageObject struct {
	Url           string `json:"url"`
	B64Json       string `json:"b64_json"`
	RevisedPrompt string `json:"revised_prompt"`
}

type SpeechToTextRequest

type SpeechToTextRequest struct {
	Model string `json:"model"`
	Audio string `json:"audio"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL