openai

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAIModel

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

func NewProvider

func NewProvider(modelName string, apiKey string) *OpenAIModel

func (*OpenAIModel) GetHeaders

func (m *OpenAIModel) GetHeaders() map[string]string

func (*OpenAIModel) GetUrl

func (m *OpenAIModel) GetUrl() string

func (*OpenAIModel) ParseResponse

func (m *OpenAIModel) ParseResponse(rawRes []byte) (string, error)

func (*OpenAIModel) PreparePayload

func (m *OpenAIModel) PreparePayload(chatHistory *chat.ChatHistory, systemPrompt string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳