Documentation
¶
Overview ¶
Package draft provides test utilities specific to the draft protocol version.
Index ¶
- Constants
- func CreateAudioMessage(role, data, mimeType string) jsonrpc.SamplingMessage
- func CreateAudioResponse(id interface{}, data string, mimeType string, model string) []byte
- func CreateCreateMessageRequest(id interface{}, messages []jsonrpc.SamplingMessage, ...) []byte
- func CreateImageMessage(role, data, mimeType string) jsonrpc.SamplingMessage
- func CreateImageResponse(id interface{}, data string, mimeType string, model string) []byte
- func CreateModelPreferences(modelNames ...string) jsonrpc.SamplingModelPreferences
- func CreateRequestMatcher() func([]byte) bool
- func CreateResponseWithOptions(id interface{}, text string, options map[string]interface{}) []byte
- func CreateTextMessage(role, text string) jsonrpc.SamplingMessage
- func CreateTextResponse(id interface{}, text string, model string) []byte
- func IsStreamingSupported() bool
- func SetupMockTransport() *test.MockTransport
Constants ¶
const Version = "draft"
The draft protocol version
Variables ¶
This section is empty.
Functions ¶
func CreateAudioMessage ¶
func CreateAudioMessage(role, data, mimeType string) jsonrpc.SamplingMessage
CreateAudioMessage creates an audio sampling message
func CreateAudioResponse ¶
CreateAudioResponse creates an audio response for the draft protocol version
func CreateCreateMessageRequest ¶
func CreateCreateMessageRequest(id interface{}, messages []jsonrpc.SamplingMessage, modelPreferences jsonrpc.SamplingModelPreferences) []byte
CreateCreateMessageRequest creates a sampling/createMessage request for draft protocol
func CreateImageMessage ¶
func CreateImageMessage(role, data, mimeType string) jsonrpc.SamplingMessage
CreateImageMessage creates an image sampling message
func CreateImageResponse ¶
CreateImageResponse creates an image response for the draft protocol version
func CreateModelPreferences ¶
func CreateModelPreferences(modelNames ...string) jsonrpc.SamplingModelPreferences
CreateModelPreferences creates sampling model preferences
func CreateRequestMatcher ¶
CreateRequestMatcher creates a matcher function for sampling requests
func CreateResponseWithOptions ¶
CreateResponseWithOptions creates a custom response with specified options
func CreateTextMessage ¶
func CreateTextMessage(role, text string) jsonrpc.SamplingMessage
CreateTextMessage creates a text sampling message
func CreateTextResponse ¶
CreateTextResponse creates a standard text response for the draft protocol version
func IsStreamingSupported ¶
func IsStreamingSupported() bool
IsStreamingSupported returns false as streaming is not supported in draft version
func SetupMockTransport ¶
func SetupMockTransport() *test.MockTransport
SetupMockTransport configures a mock transport for draft version sampling tests
Types ¶
This section is empty.