Documentation ¶
Index ¶
Constants ¶
View Source
const ( OpenAIApiUrl = "https://api.openai.com/v1/chat/completions" Model = "gpt-4o-mini" User = "user" System = "system" )
View Source
const ( MinArticleLength = 500 MaxArticleLength = 600000 // ~120.000 tokens MaxOutputTokens = 1000 PresencePenalty = 1.0 Temperature = 0.3 SystemPrompt = "Fasse den folgenden Artikel in fünf kurzen Stichpunkten zusammen. Antworte IMMER nur Deutsch. Formatiere deine Ausgabe wie folgt:\n" + "Der Artikel handelt von [Zusammenfassung in einem Satz]\n\n" + "- [Stichpunkt 1]..." )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiMessage ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func New ¶
func New(credentialService model.CredentialService) *Plugin
type Request ¶
type Request struct { Model string `json:"model"` Messages []ApiMessage `json:"messages"` PresencePenalty float32 `json:"presence_penalty"` MaxTokens int `json:"max_tokens"` Temperature float32 `json:"temperature"` }
type Response ¶
type Response struct { Choices []struct { Message ApiMessage `json:"message"` } `json:"choices"` Error struct { Message string `json:"message"` Type string `json:"type"` } `json:"error"` }
Click to show internal directories.
Click to hide internal directories.