ai_prompt

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 8 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 Message

type Message struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

type RequestMessage

type RequestMessage struct {
	Messages  []Message         `json:"messages"`
	Variables map[string]string `json:"variables"`
}

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