ai_prompt

package
v0.22.13 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "ai_prompt"
)

Variables

This section is empty.

Functions

func Create

func Create(id, name string, v *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)

func Register

func Register(register eosc.IExtenderDriverRegister)

Types

type Config

type Config struct {
	Prompt    string     `json:"prompt"`
	Variables []Variable `json:"variables"`
}

type Factory

type Factory struct {
	eosc.IExtenderDriverFactory
}

func NewFactory

func NewFactory() *Factory

func (*Factory) Create

func (f *Factory) Create(profession string, name string, label string, desc string, params map[string]interface{}) (eosc.IExtenderDriver, error)

type RequestMessage

type RequestMessage struct {
	Model     string                         `json:"model"`
	Messages  []openai.ChatCompletionMessage `json:"messages"`
	Variables map[string]string              `json:"variables,omitempty"`
}

type Variable

type Variable struct {
	Key     string `json:"key"`
	Require bool   `json:"require"`
}

Jump to

Keyboard shortcuts

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