Skip to content
Snippets Groups Projects
Select Git revision
  • main default protected
  • v1.40.21
  • v1.40.20
  • v1.40.19
  • v1.40.18
  • v1.40.17
  • v1.40.16
  • v1.40.15
  • v1.40.14
  • v1.40.13
  • v1.40.12
  • v1.40.11
  • v1.40.10
  • v1.40.9
  • v1.40.8
  • v1.40.7
  • v1.40.6
  • v1.40.5
  • v1.40.4
  • v1.40.3
  • v1.40.2
21 results

llmjuice.go

llmjuice.go 1.10 KiB
package llmjuice

// ------------------------------
// TYPES
// ------------------------------

// MessageRole represents the role of a message.
type MessageRole = string

// PrompterOpts represents the options for the Prompter.
type PrompterOpts struct {
	SystemPrompt   string                 // The system prompt for the LLM.
	UserPrompt     string                 // The user prompt for the LLM.
	Context        []Message              // The context for the LLM.
	Temperature    float64                // The temperature for the LLM.
	ResponseFormat *ResponseFormat        // The response format for the LLM.
	AdditionalOpts map[string]interface{} // Additional options for the LLM to be implemented by prompters, optionally.
}

// ------------------------------
// CONSTS
// ------------------------------

const (
	// MessageRoleSystem is the role for the system message.
	MessageRoleSystem MessageRole = "system"

	// MessageRoleUser is the role for the user message.
	MessageRoleUser MessageRole = "user"

	// MessageRoleAssistant is the role for the assistant message.
	MessageRoleAssistant MessageRole = "assistant"
)