Documentation ¶
Index ¶
Constants ¶
View Source
const BinEnvVar = "GPTSCRIPT_BIN"
View Source
const Suffix = ".gpt"
Suffix is default suffix of gptscript files
Variables ¶
View Source
var DefaultChatSchema = openapi3.Schema{ Type: &openapi3.Types{"object"}, Properties: openapi3.Schemas{ DefaultPromptParameter: &openapi3.SchemaRef{ Value: &openapi3.Schema{ Description: "Prompt to send to the assistant. This may be an instruction or question.", Type: &openapi3.Types{"string"}, }, }, }, }
View Source
var DefaultPromptParameter = "prompt"
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: &openapi3.Types{"object"}, Properties: openapi3.Schemas{ DefaultPromptParameter: &openapi3.SchemaRef{ Value: &openapi3.Schema{ Description: "Prompt to send to the tool. This may be an instruction or question.", Type: &openapi3.Types{"string"}, }, }, }, }
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.
func SetBinToSelf ¶ added in v0.8.2
func SetBinToSelf()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.