Documentation ¶
Index ¶
Constants ¶
View Source
const ( ChatURL = "https://api.openai.com/v1/chat/completions" PhotoURL = "https://api.openai.com/v1/images/generations" )
Variables ¶
View Source
var GPT_DEFAULT = ChatGPT{ Model: "gpt-4-turbo", Temperature: 1.0, TopP: 1.0, Url: ChatURL, }
Functions ¶
func NewPhotoQuerier ¶
func NewPhotoQuerier(pConf photo.Configurations) (models.Querier, error)
Types ¶
type ChatCompletion ¶
type ChatGPT ¶
type ChatGPT struct { generic.StreamCompleter Model string `json:"model"` FrequencyPenalty float64 `json:"frequency_penalty"` MaxTokens *int `json:"max_tokens"` // Use a pointer to allow null value PresencePenalty float64 `json:"presence_penalty"` Temperature float64 `json:"temperature"` TopP float64 `json:"top_p"` Url string `json:"url"` }
func (*ChatGPT) RegisterTool ¶ added in v1.2.8
type DallE ¶
type DallE struct { Model string `json:"model"` N int `json:"n"` Size string `json:"size"` Quality string `json:"quality"` Style string `json:"style"` Output photo.Output `json:"output"` // Don't save this as this is set via the Output struct ResponseFormat string `json:"-"` Prompt string `json:"-"` // contains filtered or unexported fields }
type DallERequest ¶
type GptTool ¶ added in v1.2.8
type GptTool struct { Name string `json:"name"` Description string `json:"description"` Inputs tools.InputSchema `json:"parameters"` }
type GptToolSuper ¶ added in v1.2.8
type ImageResponse ¶
type ImageResponses ¶
type ImageResponses struct { Created int `json:"created"` Data []ImageResponse `json:"data"` }
Click to show internal directories.
Click to hide internal directories.