Documentation
¶
Index ¶
- func GenerateAgents(topic string) (string, error)
- func GenerateLLMResponse(prompt string) string
- func GenerateLLMResponseWithResearch(prompt string, topic string, traits []string) string
- func GenerateMeme(block core.Block, decision string) string
- func InitAI()
- type Discussion
- type LLMConfig
- type LoanReview
- type PaperReview
- type Personality
- type ResearchDecision
- type ResearchPaper
- type SearchConfig
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAgents ¶
func GenerateLLMResponse ¶
GenerateLLMResponse generates a response using OpenAI's GPT model
func GenerateLLMResponseWithResearch ¶
GenerateLLMResponseWithResearch generates a response using OpenAI's GPT model with web research capability
func GenerateMeme ¶
GenerateMeme generates a meme response for block validation
Types ¶
type Discussion ¶
type Discussion struct {
ID string `json:"id"` // Unique identifier for the discussion
ValidatorID string `json:"validatorId"`
ValidatorName string `json:"validatorName"`
Message string `json:"message"`
Support bool `json:"support"`
Oppose bool `json:"oppose"`
Question bool `json:"question"`
Timestamp time.Time `json:"timestamp"`
Round int `json:"round"` // Which discussion round (1-5)
}
func GetValidatorDiscussion ¶
func GetValidatorDiscussion(agent core.Agent, tx core.Transaction) Discussion
type LLMConfig ¶
LLMConfig holds configuration for LLM interactions
func DefaultLLMConfig ¶
func DefaultLLMConfig() LLMConfig
DefaultLLMConfig returns standard LLM configuration
type LoanReview ¶
type LoanReview struct {
Summary string `json:"summary"`
RiskFactors []string `json:"risk_factors"`
Terms []string `json:"terms"`
Approval bool `json:"approval"`
}
func GetLoanReview ¶
func GetLoanReview(agent core.Agent, loan string, previousDiscussion string) LoanReview
func GetMultiRoundLoanReview ¶
func GetMultiRoundLoanReview(agent core.Agent, loan string, chainID string) LoanReview
type PaperReview ¶
type PaperReview struct {
Summary string `json:"summary"`
Flaws []string `json:"flaws"`
Suggestions []string `json:"suggestions"`
IsReproducible bool `json:"is_reproducible"`
Approval bool `json:"approval"`
}
func GetMultiRoundReview ¶
func GetMultiRoundReview(agent core.Agent, paper ResearchPaper, chainID string) PaperReview
func GetPaperReview ¶
func GetPaperReview(agent core.Agent, paper ResearchPaper, previousDiscussion string) PaperReview
type Personality ¶
type Personality struct {
Name string
Traits []string
Style string
MemePreferences []string
APIKey string // OpenAI API Key for AI-powered decision making
}
Personality represents an AI producer's unique identity
func (*Personality) GenerateBlockAnnouncement ¶
func (p *Personality) GenerateBlockAnnouncement(block core.Block) string
GenerateBlockAnnouncement creates a chaotic message for block propagation
func (*Personality) SelectTransactions ¶
func (p *Personality) SelectTransactions(txs []core.Transaction) []core.Transaction
SelectTransactions uses AI to choose transactions based on chaos & personality
type ResearchDecision ¶
type ResearchDecision struct {
NeedsResearch bool `json:"needs_research"`
SearchQueries []string `json:"search_queries"`
Reasoning string `json:"reasoning"`
}
ResearchDecision represents the LLM's decision about web research
type ResearchPaper ¶
type SearchConfig ¶
SearchConfig holds configuration for web search
func DefaultSearchConfig ¶
func DefaultSearchConfig() SearchConfig
DefaultSearchConfig returns standard search configuration
type SearchResult ¶
type SearchResult struct {
Title string `json:"title"`
Snippet string `json:"snippet"`
Link string `json:"link"`
}
SearchResult represents a web search result