Documentation ¶
Index ¶
- func NewConnector() (*sdk.ConnectorPlugin, error)
- type ChatCompletionChoiceResponse
- type ChatCompletionMessageResponse
- type ChatCompletionResponse
- type ChatCompletionUsageResponse
- type GeneratedImageResponse
- type ImageGenerationResponse
- type ModelListResponse
- type ModelResponse
- type PromptChatGPTOperation
- type PromptChatGPTOperationInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnector ¶
func NewConnector() (*sdk.ConnectorPlugin, error)
Types ¶
type ChatCompletionChoiceResponse ¶
type ChatCompletionChoiceResponse struct { FinishReason string `json:"finish_reason"` Index int64 `json:"index"` Message ChatCompletionMessageResponse `json:"message"` Logprobs interface{} `json:"logprobs"` }
type ChatCompletionResponse ¶
type ChatCompletionResponse struct { ID string `json:"id"` Object string `json:"object"` Created int64 `json:"created"` Model string `json:"model"` SystemFingerprint string `json:"system_fingerprint"` Choices []ChatCompletionChoiceResponse `json:"choices"` Usage ChatCompletionUsageResponse `json:"usage"` }
type GeneratedImageResponse ¶
type GeneratedImageResponse struct {
URL string `json:"url"`
}
type ImageGenerationResponse ¶
type ImageGenerationResponse struct { Created int64 `json:"created"` Data []GeneratedImageResponse `json:"data"` }
type ModelListResponse ¶
type ModelListResponse struct { Object string `json:"object"` Data []ModelResponse `json:"data"` }
type ModelResponse ¶
type PromptChatGPTOperation ¶
type PromptChatGPTOperation struct {
// contains filtered or unexported fields
}
func NewPromptChatGPT ¶
func NewPromptChatGPT() *PromptChatGPTOperation
func (*PromptChatGPTOperation) GetInfo ¶
func (c *PromptChatGPTOperation) GetInfo() *sdk.OperationInfo
func (*PromptChatGPTOperation) Run ¶
func (c *PromptChatGPTOperation) Run(ctx *sdk.RunContext) (sdk.JSON, error)
func (*PromptChatGPTOperation) Test ¶
func (c *PromptChatGPTOperation) Test(ctx *sdk.RunContext) (sdk.JSON, error)
type PromptChatGPTOperationInput ¶
type PromptChatGPTOperationInput struct { Model string `json:"model"` Prompt string `json:"prompt"` MaxTokens *int `json:"max_tokens,omitempty"` FrequencyPenalty *float64 `json:"frequency_penalty,omitempty"` // -2.0 to 2.0 PresencePenalty *float64 `json:"presence_penalty,omitempty"` // -2.0 to 2.0 Seed *int `json:"seed,omitempty"` // random integer Temperature *float64 `json:"temperature,omitempty"` // 0 to 2.0 TopP *float64 `json:"top_p,omitempty"` // not said, but it's an alternative to Temperature, so probably 0 to 2.0 }
Click to show internal directories.
Click to hide internal directories.