Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HuaYaoAI/FinGenius
/ functions
Functions
390 in github.com/HuaYaoAI/FinGenius
⨍
Functions
390
◇
Types & classes
93
↳
Endpoints
1
↓ 22 callers
Method
to_dict
Convert message to dictionary format
src/schema.py:84
↓ 17 callers
Method
add_message
Add a message to memory
src/schema.py:171
↓ 14 callers
Method
replace
Returns a new ToolResult with the given fields replaced.
src/tool/base.py:73
↓ 14 callers
Method
run
Run the MCP server.
src/mcp/server.py:157
↓ 12 callers
Method
show_progress_update
Show progress updates during analysis
src/console.py:271
↓ 12 callers
Method
system_message
Create a system message
src/schema.py:113
↓ 10 callers
Method
create
Factory method to create and properly initialize an MCPAgent instance.
src/agent/mcp.py:57
↓ 8 callers
Method
count_text
Calculate tokens for a text string
src/llm.py:75
↓ 8 callers
Method
format_messages
Format messages for LLM by converting them to OpenAI message format. Args: messages: List of messages that can be either
src/llm.py:292
↓ 7 callers
Method
create
Factory method to create and initialize an environment
src/environment/base.py:23
↓ 7 callers
Method
show_error
Display errors in a formatted way
src/console.py:344
↓ 6 callers
Method
_get_friendly_agent_name
Get friendly display name for agent
src/console.py:42
↓ 6 callers
Function
format_bytes
格式化字节数为可读格式
src/utils/cleanup_reports.py:128
↓ 6 callers
Function
get_recent_trading_day
获取最近的交易日(跳过周末) A股交易日规则: - 周一到周五是交易日 - 周六周日是休市 Args: date_format: 返回日期格式,默认为"%Y-%m-%d" Returns:
src/tool/base.py:87
↓ 6 callers
Method
update_memory
Add a message to the agent's memory. Args: role: The role of the message sender (user, system, assistant, tool). cont
src/agent/base.py:83
↓ 5 callers
Method
get_report_path
获取报告文件的完整路径
src/utils/report_manager.py:52
↓ 5 callers
Method
update_token_count
Update token counts
src/llm.py:266
↓ 4 callers
Method
_fix_encoding
Fix potential encoding issues in HTML content with enhanced validation
src/tool/create_html.py:485
↓ 4 callers
Method
assistant_message
Create an assistant message
src/schema.py:120
↓ 4 callers
Method
connect_mcp_server
Connect to an MCP server and add its tools.
src/agent/mcp.py:106
↓ 4 callers
Method
execute
Execute the tool with given parameters.
src/tool/base.py:24
↓ 4 callers
Function
get_all_section
获取所有类型板块数据,包括热门板块、概念板块、行业板块和地域板块 Args: sector_types (str, optional): 板块类型,可选值: 'all', 'hot', 'concept', 'regional', 'industry',默认为No
src/tool/financial_deep_search/get_section_data.py:70
↓ 4 callers
Function
get_index_capital_flow
获取指数资金流向数据 Args: index_code (str, optional): 指数代码,默认为上证指数 000001 Returns: dict: 资金流向数据
src/tool/financial_deep_search/index_capital.py:201
↓ 4 callers
Function
get_stock_capital_flow
获取股票资金流向数据,支持获取列表或单只股票数据 参数: page_size: 每页显示数量,默认50 page_num: 页码,默认第1页 stock_code: 股票代码,如果指定,则返回单只股票数据,否则返回列表 返
src/tool/financial_deep_search/stock_capital.py:239
↓ 4 callers
Method
list_reports
列出报告
src/utils/report_manager.py:140
↓ 3 callers
Method
_evaluate_control_level
评估控盘程度
src/tool/chip_analysis.py:695
↓ 3 callers
Method
_evaluate_selling_pressure
评估抛售压力
src/tool/chip_analysis.py:717
↓ 3 callers
Method
_evaluate_trapped_depth
评估套牢深度
src/tool/chip_analysis.py:706
↓ 3 callers
Method
_generate_main_cost_analysis_text
生成主力成本分析文本
src/tool/chip_analysis.py:812
↓ 3 callers
Method
_generate_trapped_analysis_text
生成套牢分析文本
src/tool/chip_analysis.py:816
↓ 3 callers
Method
_get_type_info
Get type information for a single type.
src/tool/create_chat_completion.py:110
↓ 3 callers
Method
_refresh_tools
Refresh the list of available tools from the MCP server.
src/agent/mcp.py:201
↓ 3 callers
Method
_save_report
通用的报告保存方法
src/utils/report_manager.py:74
↓ 3 callers
Method
add_agent
Alias for register_agent
src/environment/base.py:39
↓ 3 callers
Method
check_token_limit
Check if token limits are exceeded
src/llm.py:274
↓ 3 callers
Method
cleanup
Clean up MCP connection when done.
src/agent/mcp.py:282
↓ 3 callers
Method
count_message_tokens
(self, messages: List[dict])
src/llm.py:263
↓ 3 callers
Method
disconnect
Disconnect from a specific MCP server or all servers if no server_id provided.
src/tool/mcp_client.py:137
↓ 3 callers
Method
get_agent
Get an agent by name
src/environment/base.py:43
↓ 3 callers
Method
get_cache_file
获取缓存文件路径
src/tool/create_html.py:63
↓ 3 callers
Method
get_limit_error_message
Generate error message for token limit exceeded
src/llm.py:281
↓ 3 callers
Method
get_storage_stats
获取存储统计信息
src/utils/report_manager.py:225
↓ 3 callers
Method
initialize_mcp_servers
Initialize connections to configured MCP servers.
src/agent/mcp.py:84
↓ 3 callers
Method
mark_terminated
Mark agent as terminated
src/environment/battle.py:80
↓ 3 callers
Method
record_vote
Record agent vote for current round
src/environment/battle.py:84
↓ 3 callers
Method
register_agent
Register an agent with the environment
src/environment/base.py:33
↓ 3 callers
Method
show_section_header
Show section headers
src/console.py:338
↓ 2 callers
Method
_broadcast_message
Broadcast message to all active agents.
src/environment/battle.py:655
↓ 2 callers
Method
_build_parameters
Build parameters schema based on response type.
src/tool/create_chat_completion.py:32
↓ 2 callers
Method
_calculate_high_detail_tokens
Calculate tokens for high detail images based on dimensions
src/llm.py:117
↓ 2 callers
Method
_get_error_message
Get appropriate error message for agent
src/environment/battle.py:284
↓ 2 callers
Method
_initialize_and_list_tools
Initialize session and populate tool map.
src/tool/mcp_client.py:98
↓ 2 callers
Method
_recalculate_vote_results
重新计算投票统计结果
src/environment/battle.py:108
↓ 2 callers
Method
_run_single_agent_voting_turn
Run a single agent's voting turn with enhanced retry mechanism.
src/environment/battle.py:532
↓ 2 callers
Method
_validate_html_structure
Validate basic HTML structure
src/tool/create_html.py:568
↓ 2 callers
Method
add_event
Add event to history and return the event
src/environment/battle.py:66
↓ 2 callers
Method
add_tools
Add multiple tools to the collection. If any tool has a name conflict with an existing tool, it will be skipped and a warning will be logged.
src/tool/tool_collection.py:65
↓ 2 callers
Method
can_agent_speak
Check if agent can speak in debate (separate from voting status)
src/environment/battle.py:52
↓ 2 callers
Method
can_agent_vote
Check if agent can vote (not terminated, can vote multiple times)
src/environment/battle.py:59
↓ 2 callers
Method
cleanup_old_reports
清理过期报告
src/utils/report_manager.py:189
↓ 2 callers
Method
clear
Clear all messages
src/schema.py:185
↓ 2 callers
Method
connect_sse
Connect to an MCP server using SSE transport.
src/tool/mcp_client.py:51
↓ 2 callers
Method
execute
Execute the tool to fetch stock information. Args: stock_code: The stock code to query Returns: Sto
src/tool/stock_info_request.py:42
↓ 2 callers
Function
fetch_stock_list_capital_flow
获取股票列表的资金流向数据(按主力净流入排序) 参数: page_size: 每页显示数量,默认50 page_num: 页码,默认第1页 max_retries: 最大重试次数 retry_delay: 重试延迟时
src/tool/financial_deep_search/stock_capital.py:46
↓ 2 callers
Method
find_reports_by_stock
查找特定股票的所有报告
src/utils/report_manager.py:264
↓ 2 callers
Method
get_cache_key
生成缓存键
src/tool/create_html.py:58
↓ 2 callers
Method
initialize
Initialize a single MCP connection.
src/agent/mcp.py:165
↓ 2 callers
Method
list_tools
List all available tools.
src/tool/mcp_client.py:129
↓ 2 callers
Method
load_server_config
Load MCP server configuration from JSON file
src/config.py:129
↓ 2 callers
Method
register_all_tools
Register all tools with the server.
src/mcp/server.py:152
↓ 2 callers
Method
run
Run the battle environment with the given research report.
src/environment/battle.py:212
↓ 2 callers
Method
run
Execute the agent's main loop asynchronously. Args: request: Optional initial user request to process. Returns:
src/agent/base.py:115
↓ 2 callers
Method
save_debate_report
保存辩论对话JSON
src/utils/report_manager.py:62
↓ 2 callers
Method
save_html_report
保存HTML报告
src/utils/report_manager.py:57
↓ 2 callers
Method
save_vote_report
保存投票结果JSON
src/utils/report_manager.py:68
↓ 2 callers
Method
show_debate_message
Display debate messages with different styles
src/console.py:202
↓ 2 callers
Method
show_debate_summary
Display debate summary with voting results
src/console.py:232
↓ 2 callers
Method
show_logo
Display the FinGenius ASCII logo
src/console.py:46
↓ 2 callers
Method
step
Execute a single step in the agent's workflow. Must be implemented by subclasses to define specific behavior.
src/agent/base.py:155
↓ 2 callers
Function
to_float
(val)
src/tool/financial_deep_search/get_section_data.py:52
↓ 2 callers
Method
to_param
Convert tool to function call format.
src/tool/base.py:27
↓ 2 callers
Method
tool_message
Create a tool message
src/schema.py:127
↓ 1 callers
Method
__init__
( self, config_name: str = "default", llm_config: Optional[LLMSettings] = None )
src/llm.py:208
↓ 1 callers
Method
__init__
Initialize the volcengine TTS client. Args: appid: Platform application ID access_token: Access token for au
src/tool/tts_tool.py:63
↓ 1 callers
Method
_a_stock_special_analysis
A股特色分析
src/tool/chip_analysis.py:632
↓ 1 callers
Method
_analyze_chip_distribution
分析筹码分布
src/tool/chip_analysis.py:313
↓ 1 callers
Method
_analyze_chip_migration
分析筹码迁移
src/tool/chip_analysis.py:755
↓ 1 callers
Method
_analyze_chip_stability
分析筹码稳定性
src/tool/chip_analysis.py:771
↓ 1 callers
Method
_analyze_concentration_trend
分析集中度变化趋势
src/tool/chip_analysis.py:737
↓ 1 callers
Method
_analyze_institutional_adjustment
分析机构调仓
src/tool/chip_analysis.py:804
↓ 1 callers
Method
_analyze_news_sentiment
分析新闻情绪
src/agent/sentiment.py:166
↓ 1 callers
Method
_analyze_policy_impact
分析政策影响
src/tool/chip_analysis.py:796
↓ 1 callers
Method
_analyze_social_sentiment
分析社交媒体情绪
src/agent/sentiment.py:198
↓ 1 callers
Method
_basic_chip_analysis
基础筹码分析
src/tool/chip_analysis.py:361
↓ 1 callers
Method
_build_docstring
Build a formatted docstring from tool function metadata.
src/mcp/server.py:85
↓ 1 callers
Method
_build_signature
Build a function signature from tool function metadata.
src/mcp/server.py:107
↓ 1 callers
Method
_cleanup_duplicate_declarations
Clean up duplicate reportData declarations
src/tool/create_html.py:532
↓ 1 callers
Method
_concentration_analysis
筹码集中度分析
src/tool/chip_analysis.py:587
↓ 1 callers
Method
_convert_ollama_chunk_to_openai
将Ollama流式chunk转换为OpenAI格式
src/ollama_client.py:265
↓ 1 callers
Method
_convert_ollama_to_openai
将Ollama原生API响应转换为OpenAI格式
src/ollama_client.py:203
next →
1–100 of 390, ranked by callers