Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TextParts ¶
func TextParts(role schema.ChatMessageType, parts ...string) schema.MessageContent
Types ¶
type CallOption ¶
type CallOption func(*CallOptions)
func WithStreamingFunc ¶
func WithStreamingFunc(streamingFunc func(ctx context.Context, chunk []byte) error) CallOption
WithStreamingFunc specifies the streaming function to use.
type CallOptions ¶
type ContentChoice ¶
type ContentResponse ¶
type ContentResponse struct {
Choices []*ContentChoice
}
type Model ¶
type Model interface {
GenerateContent(ctx context.Context, messages []schema.MessageContent, options ...CallOption) (*ContentResponse, error)
Call(ctx context.Context, prompt string, options ...CallOption) (string, error)
}
Click to show internal directories.
Click to hide internal directories.