Documentation
¶
Index ¶
- type ChatService
- type GenericChatService
- func (svc *GenericChatService[Params, Response, Chunk]) New(ctx context.Context, params Params, opts ...options.RequestOption) (Response, error)
- func (svc *GenericChatService[Params, Response, Chunk]) NewStreaming(ctx context.Context, params Params, opts ...options.RequestOption) (streaming.Streamer[Chunk], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatService ¶
type GenericChatService ¶
type GenericChatService[Params any, Response any, Chunk any] struct { Options []options.RequestOption NewError config.NewAPIError Endpoint string }
GenericChatService is a generic base implementation of ChatService.
func (*GenericChatService[Params, Response, Chunk]) New ¶
func (svc *GenericChatService[Params, Response, Chunk]) New( ctx context.Context, params Params, opts ...options.RequestOption, ) (Response, error)
New creates a new chat completion.
func (*GenericChatService[Params, Response, Chunk]) NewStreaming ¶
func (svc *GenericChatService[Params, Response, Chunk]) NewStreaming( ctx context.Context, params Params, opts ...options.RequestOption, ) (streaming.Streamer[Chunk], error)
NewStreaming creates a new streaming chat completion.
Click to show internal directories.
Click to hide internal directories.