providers

package
v0.0.0-...-d67191b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

type Provider

type Provider interface {
	Active() bool
	CanStream() bool
	NewCompletionStream(messages []Message) (chan string, error)
	NewCompletion(messages []Message) (*string, error)
}

func NewProvider

func NewProvider(t ProviderType) Provider

type ProviderType

type ProviderType uint8
const (
	ProviderTypeDeepAI    ProviderType = 1
	ProviderTypeChatGPTAI ProviderType = 2
	ProviderOpchatgpts    ProviderType = 3
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL