models

package
v0.0.0-...-a8b465f Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToAzureOpenAIMessages

func ConvertToAzureOpenAIMessages(messages []Message) []azureOpenAI.ChatCompletionRequestMessage

func ConvertToOpenAIMessages

func ConvertToOpenAIMessages(messages []Message) []openAI.ChatCompletionRequestMessage

Types

type AppFile

type AppFile struct {
	Name    string `required:"true" json:"fileName"`
	Path    string `required:"true" json:"filePath"`
	Content string `required:"true" json:"fileContent"`
}

func AppFileFromString

func AppFileFromString(text string) ([]AppFile, error)

type Deployment

type Deployment int
const (
	CodeDavinci002      Deployment = iota // code-davinci-002
	TextDavinci003                        // text-davinci-003
	Gpt35Turbo0301                        // gpt-3.5-turbo-0301
	Gpt35Turbo                            // gpt-3.5-turbo
	Gpt35Turbo0301Azure                   // gpt-35-turbo-0301
	Gpt4_0314                             // gpt-4-0314
	Gpt4_32k_0314                         // gpt-4-32k-0314
)

func DeploymentFromName

func DeploymentFromName(name string) (Deployment, error)

func (Deployment) IsChat

func (d Deployment) IsChat() bool

func (Deployment) MaxTokens

func (d Deployment) MaxTokens() int

func (Deployment) String

func (d Deployment) String() string

type Message

type Message struct {
	Role    Role
	Content string
}

type Role

type Role int
const (
	System Role = iota
	User
	Assistant
)

func (Role) String

func (r Role) String() string

Jump to

Keyboard shortcuts

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