promptpal

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIRunPromptResponse

type APIRunPromptResponse struct {
	PromptID           string `json:"id"`
	ResponseMessage    string `json:"message"`
	ResponseTokenCount int    `json:"tokenCount"`
}

type Configuration

type Configuration struct {
	Input struct {
		HTTP *struct {
			URL   string `json:"url"`
			Token string `json:"token"`
		} `json:"http,omitempty"`
	} `json:"input"`
	Output struct {
		Schema  string `json:"schema"`
		GoTypes *struct {
			Prefix      string `json:"prefix"`
			PackageName string `json:"package_name"`
			Output      string `json:"output"`
		} `json:"go_types,omitempty"`
		TypeScriptTypes *struct {
			Prefix string `json:"prefix"`
			Output string `json:"output"`
		} `json:"typescript_types,omitempty"`
	} `json:"output"`
}

type PromptPalClient

type PromptPalClient interface {
	Execute(ctx context.Context, prompt string, variables any, userId *string) (*APIRunPromptResponse, error)
}

func NewPromptPalClient

func NewPromptPalClient(endpoint string, token string, options PromptPalClientOptions) PromptPalClient

type PromptPalClientOptions

type PromptPalClientOptions struct {
	Timeout *time.Duration
}

Jump to

Keyboard shortcuts

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