Versions in this module Expand all Collapse all v1 v1.0.1 Jul 31, 2024 Changes in this version + type Delta struct + StopReason string + Text string + Type string + type PartialResponse struct + Delta Delta + Index int + Message PartialResponseMessage + Type string + Usage PartialResponseUsage + type PartialResponseMessage struct + Content []interface{} + ID string + Model string + Role string + StopReason string + StopSequence interface{} + Type string + Usage PartialResponseUsage + type PartialResponseUsage struct + InputTokens int + OutputTokens int v1.0.0 Jul 13, 2024 Changes in this version + var SupportedModels = []string + func CreateBedrockClient(ctx context.Context, region string) (*bedrock.Client, error) + func CreateBedrockruntimeClient(ctx context.Context, region string) (*bedrockruntime.Client, error) + type AWSModelConfig struct + MaxTokens int + ModelID string + Temperature float64 + TopK int + TopP float64 + func NewModel(modelID string, temp, topP float64, topK, tokens int) AWSModelConfig + func (m *AWSModelConfig) InvokeModel(ctx context.Context, api ClientRuntimeAPI, message string) (string, error) + type ClientAPI interface + ListFoundationModels func(ctx context.Context, params *bedrock.ListFoundationModelsInput, ...) (*bedrock.ListFoundationModelsOutput, error) + type ClientRuntimeAPI interface + InvokeModelWithResponseStream func(ctx context.Context, params *bedrockruntime.InvokeModelWithResponseStreamInput, ...) (*bedrockruntime.InvokeModelWithResponseStreamOutput, error) + type FoundationModel struct + ID string + Modality string + Name string + Provider string + func ListModels(ctx context.Context, api ClientAPI) ([]FoundationModel, error) + type StreamingOutputHandler func(ctx context.Context, part []byte) error