claude

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MessagePayloadType = "claude.message"

Variables

This section is empty.

Functions

This section is empty.

Types

type Claude

type Claude struct{}

func (*Claude) Actions

func (i *Claude) Actions() []core.Action

func (*Claude) Cleanup

func (i *Claude) Cleanup(ctx core.IntegrationCleanupContext) error

func (*Claude) Components

func (i *Claude) Components() []core.Component

func (*Claude) Configuration

func (i *Claude) Configuration() []configuration.Field

func (*Claude) Description

func (i *Claude) Description() string

func (*Claude) HandleAction

func (i *Claude) HandleAction(ctx core.IntegrationActionContext) error

func (*Claude) HandleRequest

func (i *Claude) HandleRequest(ctx core.HTTPRequestContext)

func (*Claude) Icon

func (i *Claude) Icon() string

func (*Claude) Instructions

func (i *Claude) Instructions() string

func (*Claude) Label

func (i *Claude) Label() string

func (*Claude) ListResources

func (i *Claude) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func (*Claude) Name

func (i *Claude) Name() string

func (*Claude) Sync

func (i *Claude) Sync(ctx core.SyncContext) error

func (*Claude) Triggers

func (i *Claude) Triggers() []core.Trigger

type Client

type Client struct {
	APIKey  string
	BaseURL string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpClient core.HTTPContext, ctx core.IntegrationContext) (*Client, error)

func (*Client) CreateMessage

func (c *Client) CreateMessage(req CreateMessageRequest) (*CreateMessageResponse, error)

func (*Client) ListModels

func (c *Client) ListModels() ([]Model, error)

func (*Client) Verify

func (c *Client) Verify() error

type Configuration

type Configuration struct {
	APIKey string `json:"apiKey"`
}

type CreateMessageRequest

type CreateMessageRequest struct {
	Model       string    `json:"model"`
	Messages    []Message `json:"messages"`
	System      string    `json:"system,omitempty"`
	MaxTokens   int       `json:"max_tokens,omitempty"`
	Temperature *float64  `json:"temperature,omitempty"`
}

type CreateMessageResponse

type CreateMessageResponse struct {
	ID           string           `json:"id"`
	Type         string           `json:"type"`
	Role         string           `json:"role"`
	Content      []MessageContent `json:"content"`
	Model        string           `json:"model"`
	StopReason   string           `json:"stop_reason"`
	StopSequence string           `json:"stop_sequence,omitempty"`
	Usage        MessageUsage     `json:"usage"`
}

type Message

type Message struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

type MessageContent

type MessageContent struct {
	Type string `json:"type"`
	Text string `json:"text,omitempty"`
}

type MessagePayload

type MessagePayload struct {
	ID         string                 `json:"id"`
	Model      string                 `json:"model"`
	Text       string                 `json:"text"`
	Usage      *MessageUsage          `json:"usage,omitempty"`
	StopReason string                 `json:"stopReason,omitempty"`
	Response   *CreateMessageResponse `json:"response"`
}

type MessageUsage

type MessageUsage struct {
	InputTokens  int `json:"input_tokens"`
	OutputTokens int `json:"output_tokens"`
}

type Model

type Model struct {
	ID string `json:"id"`
}

type ModelsResponse

type ModelsResponse struct {
	Data []Model `json:"data"`
}

type TextPrompt

type TextPrompt struct{}

func (*TextPrompt) Actions

func (c *TextPrompt) Actions() []core.Action

func (*TextPrompt) Cancel

func (c *TextPrompt) Cancel(ctx core.ExecutionContext) error

func (*TextPrompt) Cleanup

func (c *TextPrompt) Cleanup(ctx core.SetupContext) error

func (*TextPrompt) Color

func (c *TextPrompt) Color() string

func (*TextPrompt) Configuration

func (c *TextPrompt) Configuration() []configuration.Field

func (*TextPrompt) Description

func (c *TextPrompt) Description() string

func (*TextPrompt) Documentation

func (c *TextPrompt) Documentation() string

func (*TextPrompt) ExampleOutput

func (c *TextPrompt) ExampleOutput() map[string]any

func (*TextPrompt) Execute

func (c *TextPrompt) Execute(ctx core.ExecutionContext) error

func (*TextPrompt) HandleAction

func (c *TextPrompt) HandleAction(ctx core.ActionContext) error

func (*TextPrompt) HandleWebhook

func (c *TextPrompt) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*TextPrompt) Icon

func (c *TextPrompt) Icon() string

func (*TextPrompt) Label

func (c *TextPrompt) Label() string

func (*TextPrompt) Name

func (c *TextPrompt) Name() string

func (*TextPrompt) OutputChannels

func (c *TextPrompt) OutputChannels(configuration any) []core.OutputChannel

func (*TextPrompt) ProcessQueueItem

func (c *TextPrompt) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*TextPrompt) Setup

func (c *TextPrompt) Setup(ctx core.SetupContext) error

type TextPromptSpec

type TextPromptSpec struct {
	Model         string   `json:"model"`
	Prompt        string   `json:"prompt"`
	SystemMessage string   `json:"systemMessage"`
	MaxTokens     int      `json:"maxTokens"`
	Temperature   *float64 `json:"temperature"`
}

Jump to

Keyboard shortcuts

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