Documentation
¶
Index ¶
- Constants
- type Client
- type Configuration
- type CreateResponse
- func (c *CreateResponse) Actions() []core.Action
- func (c *CreateResponse) Cancel(ctx core.ExecutionContext) error
- func (c *CreateResponse) Cleanup(ctx core.SetupContext) error
- func (c *CreateResponse) Color() string
- func (c *CreateResponse) Configuration() []configuration.Field
- func (c *CreateResponse) Description() string
- func (c *CreateResponse) Documentation() string
- func (c *CreateResponse) ExampleOutput() map[string]any
- func (c *CreateResponse) Execute(ctx core.ExecutionContext) error
- func (c *CreateResponse) HandleAction(ctx core.ActionContext) error
- func (c *CreateResponse) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (c *CreateResponse) Icon() string
- func (c *CreateResponse) Label() string
- func (c *CreateResponse) Name() string
- func (c *CreateResponse) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateResponse) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *CreateResponse) Setup(ctx core.SetupContext) error
- type CreateResponseRequest
- type CreateResponseSpec
- type Model
- type ModelsResponse
- type OpenAI
- func (o *OpenAI) Actions() []core.Action
- func (o *OpenAI) Cleanup(ctx core.IntegrationCleanupContext) error
- func (o *OpenAI) Components() []core.Component
- func (o *OpenAI) Configuration() []configuration.Field
- func (o *OpenAI) Description() string
- func (o *OpenAI) HandleAction(ctx core.IntegrationActionContext) error
- func (o *OpenAI) HandleRequest(ctx core.HTTPRequestContext)
- func (o *OpenAI) Icon() string
- func (o *OpenAI) Instructions() string
- func (o *OpenAI) Label() string
- func (o *OpenAI) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
- func (o *OpenAI) Name() string
- func (o *OpenAI) Sync(ctx core.SyncContext) error
- func (o *OpenAI) Triggers() []core.Trigger
- type OpenAIResponse
- type ResponseContent
- type ResponseOutput
- type ResponsePayload
- type ResponseUsage
Constants ¶
View Source
const ResponsePayloadType = "openai.response"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(httpClient core.HTTPContext, ctx core.IntegrationContext) (*Client, error)
func (*Client) CreateResponse ¶
func (c *Client) CreateResponse(model, input string) (*OpenAIResponse, error)
func (*Client) ListModels ¶
type Configuration ¶
type Configuration struct {
APIKey string `json:"apiKey"`
}
type CreateResponse ¶
type CreateResponse struct{}
func (*CreateResponse) Actions ¶
func (c *CreateResponse) Actions() []core.Action
func (*CreateResponse) Cancel ¶
func (c *CreateResponse) Cancel(ctx core.ExecutionContext) error
func (*CreateResponse) Cleanup ¶ added in v0.7.0
func (c *CreateResponse) Cleanup(ctx core.SetupContext) error
func (*CreateResponse) Color ¶
func (c *CreateResponse) Color() string
func (*CreateResponse) Configuration ¶
func (c *CreateResponse) Configuration() []configuration.Field
func (*CreateResponse) Description ¶
func (c *CreateResponse) Description() string
func (*CreateResponse) Documentation ¶
func (c *CreateResponse) Documentation() string
func (*CreateResponse) ExampleOutput ¶
func (c *CreateResponse) ExampleOutput() map[string]any
func (*CreateResponse) Execute ¶
func (c *CreateResponse) Execute(ctx core.ExecutionContext) error
func (*CreateResponse) HandleAction ¶
func (c *CreateResponse) HandleAction(ctx core.ActionContext) error
func (*CreateResponse) HandleWebhook ¶
func (c *CreateResponse) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*CreateResponse) Icon ¶
func (c *CreateResponse) Icon() string
func (*CreateResponse) Label ¶
func (c *CreateResponse) Label() string
func (*CreateResponse) Name ¶
func (c *CreateResponse) Name() string
func (*CreateResponse) OutputChannels ¶
func (c *CreateResponse) OutputChannels(configuration any) []core.OutputChannel
func (*CreateResponse) ProcessQueueItem ¶
func (c *CreateResponse) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*CreateResponse) Setup ¶
func (c *CreateResponse) Setup(ctx core.SetupContext) error
type CreateResponseRequest ¶
type CreateResponseSpec ¶
type ModelsResponse ¶
type ModelsResponse struct {
Data []Model `json:"data"`
}
type OpenAI ¶
type OpenAI struct{}
func (*OpenAI) Cleanup ¶ added in v0.6.0
func (o *OpenAI) Cleanup(ctx core.IntegrationCleanupContext) error
func (*OpenAI) Components ¶
func (*OpenAI) Configuration ¶
func (o *OpenAI) Configuration() []configuration.Field
func (*OpenAI) Description ¶
func (*OpenAI) HandleAction ¶ added in v0.6.0
func (o *OpenAI) HandleAction(ctx core.IntegrationActionContext) error
func (*OpenAI) HandleRequest ¶
func (o *OpenAI) HandleRequest(ctx core.HTTPRequestContext)
func (*OpenAI) Instructions ¶
func (*OpenAI) ListResources ¶
func (o *OpenAI) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
type OpenAIResponse ¶
type OpenAIResponse struct {
ID string `json:"id"`
Model string `json:"model"`
OutputText string `json:"output_text"`
Output []ResponseOutput `json:"output"`
Usage *ResponseUsage `json:"usage,omitempty"`
}
type ResponseContent ¶
type ResponseOutput ¶
type ResponseOutput struct {
Type string `json:"type"`
Role string `json:"role"`
Content []ResponseContent `json:"content"`
}
type ResponsePayload ¶
type ResponsePayload struct {
ID string `json:"id"`
Model string `json:"model"`
Text string `json:"text"`
Usage *ResponseUsage `json:"usage,omitempty"`
Response *OpenAIResponse `json:"response"`
}
type ResponseUsage ¶
Click to show internal directories.
Click to hide internal directories.