Documentation
¶
Index ¶
- Constants
- func AllAroundAnalystSystemPrompt(_ context.Context, _ any) (string, error)
- func ComprehensiveAnalystSystemPrompt(_ context.Context, _ any) (string, error)
- func FundamentalAnalystSystemPrompt(_ context.Context, _ any) (string, error)
- func GetMetaStringSliceValue(meta any, key string) []string
- func GetMetaStringValue(meta any, key string) string
- func GetMetaValue(meta any, key string) any
- func MacroeconomicAnalystSystemPrompt(_ context.Context, _ any) (string, error)
- func NewDefaultAgents(comprehensiveAnalysisTools []ai.ToolRef, ...) (flows.AgentOptions, []flows.AgentOptions)
- func TechnicalAnalystSystemPrompt(_ context.Context, _ any) (string, error)
- type NFAAgent
- func (a *NFAAgent) Authenticate(_ context.Context, _ acp.AuthenticateRequest) (acp.AuthenticateResponse, error)
- func (a *NFAAgent) AvailableModels() []string
- func (a *NFAAgent) Cancel(_ context.Context, params acp.CancelNotification) error
- func (a *NFAAgent) Connect(in io.Reader, out io.Writer) error
- func (a *NFAAgent) InitGenkit(ctx context.Context)
- func (a *NFAAgent) Initialize(ctx context.Context, _ acp.InitializeRequest) (acp.InitializeResponse, error)
- func (a *NFAAgent) NewSession(_ context.Context, _ acp.NewSessionRequest) (acp.NewSessionResponse, error)
- func (a *NFAAgent) Prompt(ctx context.Context, params acp.PromptRequest) (acp.PromptResponse, error)
- func (a *NFAAgent) SetSessionMode(_ context.Context, _ acp.SetSessionModeRequest) (acp.SetSessionModeResponse, error)
- type Options
- type Session
Constants ¶
View Source
const ( MetaKeyModelName = "modelName" MetaKeyAvailableModels = "availableModels" MetaKeyDefaultModel = "defaultModel" )
View Source
const ChatFlowName = "Chat"
Variables ¶
This section is empty.
Functions ¶
func AllAroundAnalystSystemPrompt ¶
AllAroundAnalystSystemPrompt 全能分析师系统提示
func ComprehensiveAnalystSystemPrompt ¶
ComprehensiveAnalystSystemPrompt 综合分析师系统提示
func FundamentalAnalystSystemPrompt ¶
FundamentalAnalystSystemPrompt 基本面分析师系统提示
func GetMetaStringSliceValue ¶
GetMetaStringSliceValue 从 _meta 中获取指定 key 的字符串切片值
func GetMetaStringValue ¶
GetMetaStringValue 从 _meta 中获取指定 key 的字符串值
func MacroeconomicAnalystSystemPrompt ¶
MacroeconomicAnalystSystemPrompt 宏观经济分析师系统提示
func NewDefaultAgents ¶
func NewDefaultAgents( comprehensiveAnalysisTools []ai.ToolRef, macroeconomicAnalysisTools []ai.ToolRef, fundamentalAnalysisTools []ai.ToolRef, technicalAnalysisTools []ai.ToolRef, ) (flows.AgentOptions, []flows.AgentOptions)
NewDefaultAgents 创建默认 Agent 列表
Types ¶
type NFAAgent ¶
type NFAAgent struct {
// contains filtered or unexported fields
}
NFAAgent NFA Agent
func (*NFAAgent) Authenticate ¶
func (a *NFAAgent) Authenticate(_ context.Context, _ acp.AuthenticateRequest) (acp.AuthenticateResponse, error)
Authenticate 认证
func (*NFAAgent) AvailableModels ¶
AvailableModels 获取可用模型名列表
func (*NFAAgent) InitGenkit ¶
InitGenkit 初始化 genkit
func (*NFAAgent) Initialize ¶
func (a *NFAAgent) Initialize(ctx context.Context, _ acp.InitializeRequest) (acp.InitializeResponse, error)
Initialize 初始化连接
func (*NFAAgent) NewSession ¶
func (a *NFAAgent) NewSession(_ context.Context, _ acp.NewSessionRequest) (acp.NewSessionResponse, error)
NewSession 创建会话
func (*NFAAgent) Prompt ¶
func (a *NFAAgent) Prompt(ctx context.Context, params acp.PromptRequest) (acp.PromptResponse, error)
Prompt 对话
func (*NFAAgent) SetSessionMode ¶
func (a *NFAAgent) SetSessionMode(_ context.Context, _ acp.SetSessionModeRequest) (acp.SetSessionModeResponse, error)
SetSessionMode 设置会话模式
type Options ¶
type Options struct {
Logger logr.Logger
ModelProviders []models.ModelProvider
DataProviders []dataproviders.DataProvider
DefaultModel string
SingleAgent bool
}
Options Agent 运行选项
Click to show internal directories.
Click to hide internal directories.