system

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

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

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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