Documentation ¶
Index ¶
- type GPT3Driver
- func (c *GPT3Driver) GetResponse(prompt models.PromptToSend) ([]string, error)
- func (c *GPT3Driver) GetStreamResponse(prompt models.PromptToSend) (interfaces.StreamReceiver, error)
- func (c *GPT3Driver) SendRequest(p models.PromptToSend) (*openai.CompletionResponse, error)
- func (c *GPT3Driver) SendStreamRequest(p models.PromptToSend) (*openai.CompletionStream, error)
- func (c *GPT3Driver) StreamAvailable() bool
- func (c *GPT3Driver) ToStream() interfaces.ProviderStreamDriver
- type GPT3Receiver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GPT3Driver ¶
type GPT3Driver struct {
Client *openai.Client
}
func New ¶
func New(token string) *GPT3Driver
func NewWithProvider ¶ added in v0.1.0
func NewWithProvider(token, provider string) *GPT3Driver
func (*GPT3Driver) GetResponse ¶
func (c *GPT3Driver) GetResponse(prompt models.PromptToSend) ([]string, error)
func (*GPT3Driver) GetStreamResponse ¶
func (c *GPT3Driver) GetStreamResponse(prompt models.PromptToSend) (interfaces.StreamReceiver, error)
func (*GPT3Driver) SendRequest ¶
func (c *GPT3Driver) SendRequest(p models.PromptToSend) (*openai.CompletionResponse, error)
func (*GPT3Driver) SendStreamRequest ¶
func (c *GPT3Driver) SendStreamRequest(p models.PromptToSend) (*openai.CompletionStream, error)
func (*GPT3Driver) StreamAvailable ¶
func (c *GPT3Driver) StreamAvailable() bool
func (*GPT3Driver) ToStream ¶
func (c *GPT3Driver) ToStream() interfaces.ProviderStreamDriver
type GPT3Receiver ¶
type GPT3Receiver struct {
Stream *openai.CompletionStream
}
func (*GPT3Receiver) Close ¶
func (r *GPT3Receiver) Close()
Click to show internal directories.
Click to hide internal directories.