Documentation
¶
Index ¶
- Variables
- type GPTMessage
- type GPTModel
- type GPTParameter
- type GPTParameterName
- type KeyType
- type Response
- type RoleModel
- type YandexGPTSyncApp
- func (p *YandexGPTSyncApp) AddMessage(Message GPTMessage) error
- func (p *YandexGPTSyncApp) AddRawMessage(Message model.Message) error
- func (p *YandexGPTSyncApp) ChangeCredentials(Key string, KeyType KeyType)
- func (p *YandexGPTSyncApp) ClearMessages()
- func (p *YandexGPTSyncApp) Configure(Parameters ...GPTParameter) error
- func (p *YandexGPTSyncApp) SendRequest() (Response, error)
- func (p *YandexGPTSyncApp) SetMessages(Messages ...GPTMessage) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GPTModelLite = GPTModel{ModelName: "yandexgpt-lite/latest"} GPTModelPRO = GPTModel{ModelName: "yandexgpt/latest"} API_KEY = KeyType{"Api-Key"} Bearer = KeyType{"Bearer"} RoleUser = RoleModel{RoleName: "user"} RoleAssistant = RoleModel{RoleName: "assistant"} ParameterTemperature = GPTParameterName{Name: "temperature"} ParameterPrompt = GPTParameterName{Name: "prompt"} ParameterMaxTokens = GPTParameterName{Name: "max_tokens"} )
Functions ¶
This section is empty.
Types ¶
type GPTMessage ¶
type GPTParameter ¶
type GPTParameter struct { Name GPTParameterName Value string }
type GPTParameterName ¶
type GPTParameterName struct {
Name string
}
func (*GPTParameterName) String ¶
func (n *GPTParameterName) String() string
type YandexGPTSyncApp ¶
type YandexGPTSyncApp struct { App *endpoint.App SystemMessage model.Message Message []model.Message Response Response DebugMode bool }
func NewYandexGPTSyncApp ¶
func NewYandexGPTSyncApp(Key string, KeyType KeyType, StorageID string, Model GPTModel) *YandexGPTSyncApp
func (*YandexGPTSyncApp) AddMessage ¶
func (p *YandexGPTSyncApp) AddMessage(Message GPTMessage) error
func (*YandexGPTSyncApp) AddRawMessage ¶
func (p *YandexGPTSyncApp) AddRawMessage(Message model.Message) error
Unsafe: AddRawMessage is unsafe function. Use AddMessage(Message GPTMessage)
func (*YandexGPTSyncApp) ChangeCredentials ¶
func (p *YandexGPTSyncApp) ChangeCredentials(Key string, KeyType KeyType)
func (*YandexGPTSyncApp) ClearMessages ¶
func (p *YandexGPTSyncApp) ClearMessages()
func (*YandexGPTSyncApp) Configure ¶
func (p *YandexGPTSyncApp) Configure(Parameters ...GPTParameter) error
func (*YandexGPTSyncApp) SendRequest ¶
func (p *YandexGPTSyncApp) SendRequest() (Response, error)
func (*YandexGPTSyncApp) SetMessages ¶
func (p *YandexGPTSyncApp) SetMessages(Messages ...GPTMessage) error
Click to show internal directories.
Click to hide internal directories.