Documentation
¶
Index ¶
- func QueryOpenAIAPIModel(ctx context.Context, client *openai.Client, modelIdentifier string, ...) (result *provider.QueryResult, err error)
- type Provider
- func (p *Provider) AddModel(m model.Model)
- func (p *Provider) Available(logger *log.Logger) (err error)
- func (p *Provider) ID() (id string)
- func (p *Provider) Models() (models []model.Model, err error)
- func (p *Provider) Query(ctx context.Context, logger *log.Logger, model model.Model, promptText string) (result *provider.QueryResult, err error)
- func (p *Provider) SetToken(token string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider holds a generic "OpenAI API" provider.
func NewProvider ¶
NewProvider returns a generic "OpenAI API" provider.
func (*Provider) Available ¶
Available checks if the provider is ready to be used. This might include checking for an installation or making sure an API access token is valid.
func (*Provider) Models ¶
Models returns which models are available to be queried via this provider.
Click to show internal directories.
Click to hide internal directories.