Documentation ¶
Index ¶
Constants ¶
View Source
const Suffix = ".gpt"
Suffix is default suffix of gptscript files
Variables ¶
View Source
var DefaultPromptParameter = "defaultPromptParameter"
DefaultPromptParameter is used as the key in a json map to indication that we really wanted to just send pure text but the interface required JSON (as that is the fundamental interface of tools in OpenAI)
View Source
var DefaultToolSchema = openapi3.Schema{ Type: "object", Properties: openapi3.Schemas{ DefaultPromptParameter: &openapi3.SchemaRef{ Value: &openapi3.Schema{ Description: "Prompt to send to the tool or assistant. This may be instructions or question.", Type: "string", }, }, }, Required: []string{DefaultPromptParameter}, }
View Source
var InternalSystemPrompt = `` /* 381-byte string literal not displayed */
InternalSystemPrompt is added to all threads. Changing this is very dangerous as it has a terrible global effect and changes the behavior of all scripts.
Functions ¶
func IsDefaultPrompt ¶
IsDefaultPrompt Checks if the content is a json blob that has the defaultPromptParameter in it. If so it will extract out the value and return it. If not it will return the original content as is and false.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.