provider

package
v0.0.0-...-009dced Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IModelProvider

type IModelProvider interface {
	GetEndpoint() string
	GetModels() []string
	CountTokens(req *http.Request, model string) (int, error)
}

type OpenAIProvider

type OpenAIProvider struct {
	// contains filtered or unexported fields
}

func NewOpenAIProvider

func NewOpenAIProvider() *OpenAIProvider

func (*OpenAIProvider) CountTokens

func (o *OpenAIProvider) CountTokens(req *http.Request, model string) (int, error)

func (*OpenAIProvider) GetEndpoint

func (o *OpenAIProvider) GetEndpoint() string

func (*OpenAIProvider) GetModels

func (o *OpenAIProvider) GetModels() []string

Jump to

Keyboard shortcuts

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