entity

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: MIT Imports: 1 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Function

type Function struct {
	Name        string  `json:"name"`
	Description *string `json:"description,omitempty"`
	Parameters  *string `json:"parameters,omitempty"`
}

func (*Function) DeepCopy

func (f *Function) DeepCopy() *Function

type LLMConfig

type LLMConfig struct {
	Temperature      *float64 `json:"temperature,omitempty"`
	MaxTokens        *int32   `json:"max_tokens,omitempty"`
	TopK             *int32   `json:"top_k,omitempty"`
	TopP             *float64 `json:"top_p,omitempty"`
	FrequencyPenalty *float64 `json:"frequency_penalty,omitempty"`
	PresencePenalty  *float64 `json:"presence_penalty,omitempty"`
	JSONMode         *bool    `json:"json_mode,omitempty"`
}

func (*LLMConfig) DeepCopy

func (mc *LLMConfig) DeepCopy() *LLMConfig

type Message

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

func (*Message) DeepCopy

func (m *Message) DeepCopy() *Message

type Prompt

type Prompt struct {
	WorkspaceID    string          `json:"workspace_id"`
	PromptKey      string          `json:"prompt_key"`
	Version        string          `json:"version"`
	PromptTemplate *PromptTemplate `json:"prompt_template,omitempty"`
	Tools          []*Tool         `json:"tools,omitempty"`
	ToolCallConfig *ToolCallConfig `json:"tool_call_config,omitempty"`
	LLMConfig      *LLMConfig      `json:"llm_config,omitempty"`
}

func (*Prompt) DeepCopy

func (p *Prompt) DeepCopy() *Prompt

type PromptTemplate

type PromptTemplate struct {
	TemplateType TemplateType   `json:"template_type"`
	Messages     []*Message     `json:"messages,omitempty"`
	VariableDefs []*VariableDef `json:"variable_defs,omitempty"`
}

func (*PromptTemplate) DeepCopy

func (pt *PromptTemplate) DeepCopy() *PromptTemplate

type Role

type Role string
const (
	RoleSystem      Role = "system"
	RoleUser        Role = "user"
	RoleAssistant   Role = "assistant"
	RoleTool        Role = "tool"
	RolePlaceholder Role = "placeholder"
)

type TemplateType

type TemplateType string
const (
	TemplateTypeNormal TemplateType = "normal"
)

type Tool

type Tool struct {
	Type     ToolType  `json:"type"`
	Function *Function `json:"function,omitempty"`
}

func (*Tool) DeepCopy

func (t *Tool) DeepCopy() *Tool

type ToolCallConfig

type ToolCallConfig struct {
	ToolChoice ToolChoiceType `json:"tool_choice"`
}

func (*ToolCallConfig) DeepCopy

func (tc *ToolCallConfig) DeepCopy() *ToolCallConfig

type ToolChoiceType

type ToolChoiceType string
const (
	ToolChoiceTypeAuto ToolChoiceType = "auto"
	ToolChoiceTypeNone ToolChoiceType = "none"
)

type ToolType

type ToolType string
const (
	ToolTypeFunction ToolType = "function"
)

type VariableDef

type VariableDef struct {
	Key  string       `json:"key"`
	Desc string       `json:"desc"`
	Type VariableType `json:"type"`
}

func (*VariableDef) DeepCopy

func (v *VariableDef) DeepCopy() *VariableDef

type VariableType

type VariableType string
const (
	VariableTypeString      VariableType = "string"
	VariableTypePlaceholder VariableType = "placeholder"
)

Jump to

Keyboard shortcuts

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