system

package
v0.9.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 6

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 = "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: &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 Bin added in v0.8.0

func Bin() string

func IsDefaultPrompt

func IsDefaultPrompt(content string) (string, bool)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL