Documentation ¶
Overview ¶
This package contains test intended to be used by the implementations of the Querier, ChatQuerier and StreamCompleter interfaces
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChatQuerier_Test ¶ added in v1.2.0
func ChatQuerier_Test(t *testing.T, q ChatQuerier)
func Querier_Context_Test ¶ added in v1.2.0
func StreamCompleter_Test ¶ added in v1.2.0
func StreamCompleter_Test(t *testing.T, s StreamCompleter)
Types ¶
type Chat ¶
func (*Chat) SystemMessage ¶
SystemMessage returns the first encountered Message with role 'system'
type ChatQuerier ¶
type CompletionEvent ¶ added in v1.2.0
type CompletionEvent any
type StreamCompleter ¶ added in v1.2.0
type StreamCompleter interface { // Setup the stream completer, do things like init http.Client/websocket etc // Will be called asynchronously. Should return error if setup fails Setup() error // StreamCompletions and return a channel which sends CompletionsEvents. // The CompletionEvents should either be a string or an error. If there is // a catastrophic error, return the error and close the channel. StreamCompletions(context.Context, Chat) (chan CompletionEvent, error) }
Click to show internal directories.
Click to hide internal directories.