Documentation ¶
Index ¶
- func Init(logger *zap.Logger) base.IConnector
- type AudioTranscriptionInput
- type AudioTranscriptionReq
- type AudioTranscriptionResp
- type Choices
- type Connector
- type Content
- type Data
- type Execution
- type ImageGenerationsOutput
- type ImageGenerationsOutputResult
- type ImageGenerationsReq
- type ImageGenerationsResp
- type ImageGenerationsRespData
- type ImageURL
- type ImagesGenerationInput
- type ListModelsResponse
- type Message
- type Model
- type ModelPermission
- type MultiModalMessage
- type OutputMessage
- type ResponseFormatStruct
- type TextCompletionInput
- type TextCompletionOutput
- type TextCompletionReq
- type TextCompletionResp
- type TextEmbeddingsInput
- type TextEmbeddingsOutput
- type TextEmbeddingsReq
- type TextEmbeddingsResp
- type TextMessage
- type TextToSpeechInput
- type TextToSpeechOutput
- type TextToSpeechReq
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AudioTranscriptionInput ¶
type AudioTranscriptionReq ¶
type AudioTranscriptionResp ¶
type AudioTranscriptionResp struct {
Text string `json:"text"`
}
type Choices ¶
type Choices struct { Index int `json:"index"` FinishReason string `json:"finish_reason"` Message OutputMessage `json:"message"` }
type Connector ¶
func (*Connector) CreateExecution ¶
type ImageGenerationsOutput ¶
type ImageGenerationsOutput struct {
Results []ImageGenerationsOutputResult `json:"results"`
}
type ImageGenerationsReq ¶
type ImageGenerationsResp ¶
type ImageGenerationsResp struct {
Data []ImageGenerationsRespData `json:"data"`
}
type ImagesGenerationInput ¶
type ListModelsResponse ¶
type Model ¶
type Model struct { ID string `json:"id"` Object string `json:"object"` Created int `json:"created"` OwnedBy string `json:"owned_by"` Permission []ModelPermission `json:"permission"` Root string `json:"root"` }
Model represents a OpenAI Model
type ModelPermission ¶
type ModelPermission struct { ID string `json:"id"` Object string `json:"object"` Created int `json:"created"` AllowCreateEngine bool `json:"allow_create_engine"` AllowSampling bool `json:"allow_sampling"` AllowLogprobs bool `json:"allow_logprobs"` AllowSearchIndices bool `json:"allow_search_indices"` AllowView bool `json:"allow_view"` AllowFineTuning bool `json:"allow_fine_tuning"` Organization string `json:"organization"` IsBlocking bool `json:"is_blocking"` }
type MultiModalMessage ¶
type OutputMessage ¶
type ResponseFormatStruct ¶
type ResponseFormatStruct struct {
Type string `json:"type,omitempty"`
}
type TextCompletionInput ¶
type TextCompletionInput struct { Prompt string `json:"prompt"` Images []string `json:"images"` ChatHistory []*TextMessage `json:"chat_history,omitempty"` Model string `json:"model"` SystemMessage *string `json:"system_message,omitempty"` Temperature *float32 `json:"temperature,omitempty"` TopP *float32 `json:"top_p,omitempty"` N *int `json:"n,omitempty"` Stop *string `json:"stop,omitempty"` MaxTokens *int `json:"max_tokens,omitempty"` PresencePenalty *float32 `json:"presence_penalty,omitempty"` FrequencyPenalty *float32 `json:"frequency_penalty,omitempty"` ResponseFormat *ResponseFormatStruct `json:"response_format,omitempty"` }
type TextCompletionOutput ¶
type TextCompletionOutput struct {
Texts []string `json:"texts"`
}
type TextCompletionReq ¶
type TextCompletionReq struct { Model string `json:"model"` Messages []interface{} `json:"messages"` Temperature *float32 `json:"temperature,omitempty"` TopP *float32 `json:"top_p,omitempty"` N *int `json:"n,omitempty"` Stop *string `json:"stop,omitempty"` MaxTokens *int `json:"max_tokens,omitempty"` PresencePenalty *float32 `json:"presence_penalty,omitempty"` FrequencyPenalty *float32 `json:"frequency_penalty,omitempty"` ResponseFormat *ResponseFormatStruct `json:"response_format,omitempty"` }
type TextCompletionResp ¶
type TextEmbeddingsInput ¶
type TextEmbeddingsOutput ¶
type TextEmbeddingsOutput struct {
Embedding []float64 `json:"embedding"`
}
type TextEmbeddingsReq ¶
type TextEmbeddingsResp ¶
type TextMessage ¶
type TextToSpeechInput ¶
type TextToSpeechOutput ¶
type TextToSpeechOutput struct {
Audio string `json:"audio"`
}
type TextToSpeechReq ¶
Click to show internal directories.
Click to hide internal directories.