bedrock_support

package
v0.3.50 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AI21

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

func (*AI21) GetCompletion

func (a *AI21) GetCompletion(ctx context.Context, prompt string, modelConfig BedrockModelConfig) ([]byte, error)

type AI21Response

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

func (*AI21Response) ParseResponse

func (a *AI21Response) ParseResponse(rawResponse []byte) (string, error)

type AmazonCompletion

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

func (*AmazonCompletion) GetCompletion

func (a *AmazonCompletion) GetCompletion(ctx context.Context, prompt string, modelConfig BedrockModelConfig) ([]byte, error)

type AmazonResponse

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

func (*AmazonResponse) ParseResponse

func (a *AmazonResponse) ParseResponse(rawResponse []byte) (string, error)

type BedrockModel

type BedrockModel struct {
	Name       string
	Completion ICompletion
	Response   IResponse
	Config     BedrockModelConfig
}

type BedrockModelConfig

type BedrockModelConfig struct {
	MaxTokens   int
	Temperature float32
	TopP        float32
}

type CohereCompletion

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

func (*CohereCompletion) GetCompletion

func (a *CohereCompletion) GetCompletion(ctx context.Context, prompt string, modelConfig BedrockModelConfig) ([]byte, error)

type CohereResponse

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

func (*CohereResponse) ParseResponse

func (a *CohereResponse) ParseResponse(rawResponse []byte) (string, error)

type ICompletion

type ICompletion interface {
	GetCompletion(ctx context.Context, prompt string, modelConfig BedrockModelConfig) ([]byte, error)
}

type IResponse

type IResponse interface {
	ParseResponse(rawResponse []byte) (string, error)
}

Jump to

Keyboard shortcuts

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