bedrock

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeToolName

func NormalizeToolName(input string) string

Types

type Client

type Client interface {
	InvokeModel(ctx context.Context, input *bedrockruntime.InvokeModelInput, optFns ...func(*bedrockruntime.Options)) (*bedrockruntime.InvokeModelOutput, error)
	ConverseStream(ctx context.Context, params *bedrockruntime.ConverseStreamInput, optFns ...func(*bedrockruntime.Options)) (*bedrockruntime.ConverseStreamOutput, error)
}

type ModelProvider

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

func NewWithClient

func NewWithClient(client Client) *ModelProvider

func (*ModelProvider) GenerateImage

func (*ModelProvider) GenerateText

func (*ModelProvider) SetClilent

func (p *ModelProvider) SetClilent(client Client)

type StableDiffusionXLArtifact

type StableDiffusionXLArtifact struct {
	Seed         int64  `json:"seed"`
	Base64       string `json:"base64"`
	FinishReason string `json:"finishReason"`
}

type StableDiffusionXLJSONPrompt

type StableDiffusionXLJSONPrompt struct {
	Prompt         string `json:"prompt"`
	NegativePrompt string `json:"negative_prompt"`
	StylePreset    string `json:"style_preset"`
}

type StableDiffusionXLRequset

type StableDiffusionXLRequset struct {
	TextPrompts []StableDiffusionXLTextPrompt `json:"text_prompts"`
	Height      int                           `json:"height,omitempty"`
	Width       int                           `json:"width,omitempty"`
	StylePreset string                        `json:"style_preset,omitempty"`
	Seed        int64                         `json:"seed,omitempty"`
	CFGScale    float64                       `json:"cfg_scale,omitempty"`
	Steps       int                           `json:"steps,omitempty"`
	Sampler     string                        `json:"sampler,omitempty"`
	Samples     int                           `json:"samples,omitempty"`
	Extra       json.RawMessage               `json:"extra,omitempty"`
}

https://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/model-parameters-diffusion-1-0-text-image.html

type StableDiffusionXLResponse

type StableDiffusionXLResponse struct {
	Result    string                      `json:"result"`
	Artifacts []StableDiffusionXLArtifact `json:"artifacts"`
}

type StableDiffusionXLTextPrompt

type StableDiffusionXLTextPrompt struct {
	Text   string  `json:"text"`
	Weight float64 `json:"weight"`
}

Jump to

Keyboard shortcuts

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