bedrock

package
v1.3.28 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetModels

func GetModels() []string

func PromptModel

func PromptModel(prompt string, temp float32, top_p float32, max_len int) string

func PromptModelStream

func PromptModelStream(prompt string, temp float32, top_p float32, max_len int) (*bedrockruntime.InvokeModelWithResponseStreamOutput, error)

func StartChatSession

func StartChatSession()

Types

type Generation

type Generation struct {
	Generation           string `json:"generation"`
	PromptTokenCount     int    `json:"prompt_token_count"`
	GenerationTokenCount int    `json:"generation_token_count"`
	StopReason           string `json:"stop_reason"`
}

type Models

type Models struct {
	LLAMA3_8B  string
	LLAMA3_70B string
}

func OurModels

func OurModels() *Models

type StreamingOutputHandler

type StreamingOutputHandler func(ctx context.Context, part Generation) error

Jump to

Keyboard shortcuts

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