createmessage

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCreateMessageRequest

func BuildCreateMessageRequest(cfg *Config) (*mcp.CreateMessageRequest, error)

BuildCreateMessageRequest validates and converts the config into a protocol request.

func MapResult

func MapResult(res *mcp.CreateMessageResult) (sampling.Message, map[string]any)

Map protocol result to ergonomic message + meta fields.

Types

type Config

type Config struct {
	System         string
	User           sampling.Message // required
	History        []sampling.Message
	ModelPrefs     *mcp.ModelPreferences
	Temperature    float64
	MaxTokens      int
	StopSequences  []string
	Metadata       map[string]any
	IncludeContext string
}

Config accumulates sampling request parameters. Internal to engine + sessions. All fields are optional unless otherwise stated.

Jump to

Keyboard shortcuts

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