bedrock

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnthropicContent

type AnthropicContent struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

AnthropicContent represents content in the Anthropic API response

type AnthropicMessage

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

AnthropicMessage represents a message in the Anthropic API format

type AnthropicRequest

type AnthropicRequest struct {
	AnthropicVersion string             `json:"anthropic_version"`
	Messages         []AnthropicMessage `json:"messages"`
	MaxTokens        int                `json:"max_tokens"`
}

AnthropicRequest represents a request to the Anthropic API

type AnthropicResponse

type AnthropicResponse struct {
	ID           string             `json:"id"`
	Type         string             `json:"type"`
	Role         string             `json:"role"`
	Model        string             `json:"model"`
	Content      []AnthropicContent `json:"content"`
	StopReason   string             `json:"stop_reason"`
	StopSequence *string            `json:"stop_sequence"`
	Usage        AnthropicUsage     `json:"usage"`
}

AnthropicResponse represents a response from the Anthropic API

type AnthropicResponseMessage

type AnthropicResponseMessage struct {
	Role    string             `json:"role"`
	Content []AnthropicContent `json:"content"`
}

AnthropicResponseMessage represents a message in the Anthropic API response

type AnthropicUsage

type AnthropicUsage struct {
	InputTokens              int `json:"input_tokens"`
	CacheCreationInputTokens int `json:"cache_creation_input_tokens"`
	CacheReadInputTokens     int `json:"cache_read_input_tokens"`
	OutputTokens             int `json:"output_tokens"`
}

AnthropicUsage represents usage information in the Anthropic API response

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents an AWS Bedrock client

func NewClient

func NewClient(region, modelID string) (*Client, error)

NewClient creates a new AWS Bedrock client

func (*Client) GenerateCommitMessage

func (c *Client) GenerateCommitMessage(diff string, branch string) (string, error)

GenerateCommitMessage generates a commit message based on the provided diff

Jump to

Keyboard shortcuts

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