MCPcopy Create free account

hub / github.com/THESIS-AGENT/AIRouter / functions

Functions186 in github.com/THESIS-AGENT/AIRouter

↓ 1 callersFunctionstress_test_model_switching
测试模型切换性能
unit_test/comprehensive_test_suite.py:530
↓ 1 callersFunctionstress_test_sustained_load
持续负载压力测试
unit_test/comprehensive_test_suite.py:465
↓ 1 callersFunctiontest_api_key_rotation
测试API密钥轮询
api_key_manager/unit_test.py:219
↓ 1 callersMethodtest_blacklist_configuration
测试1: 验证屏蔽配置是否正确
test_blacklist_integration.py:69
↓ 1 callersFunctiontest_blacklist_filtering
测试屏蔽功能
test_real_services_integration.py:65
↓ 1 callersFunctiontest_blacklisted_model_usability
测试屏蔽模型仍然可用
test_real_services_integration.py:138
↓ 1 callersMethodtest_blacklisted_models_still_usable
测试5: 验证屏蔽模型仍然可以通过LoadBalancing使用
test_blacklist_integration.py:251
↓ 1 callersFunctiontest_cache_refresh
测试缓存刷新功能
test_performance.py:212
↓ 1 callersMethodtest_checkHealthy_filtering
测试2: 验证CheckHealthy是否正确过滤屏蔽模型
test_blacklist_integration.py:109
↓ 1 callersFunctiontest_concurrent_edge_cases
测试并发边界情况
unit_test/edge_case_tests.py:454
↓ 1 callersFunctiontest_concurrent_performance
测试并发性能
test_performance.py:99
↓ 1 callersFunctiontest_cost_optimization
测试成本优化模式
unit_test/performance_test.py:449
↓ 1 callersFunctiontest_error_recovery
测试错误恢复能力
unit_test/performance_test.py:353
↓ 1 callersFunctiontest_extreme_inputs
测试极端输入情况
unit_test/edge_case_tests.py:67
↓ 1 callersFunctiontest_function_calling
测试函数调用功能
unit_test/comprehensive_test_suite.py:194
↓ 1 callersFunctiontest_function_calling_edge_cases
测试函数调用边界情况
unit_test/edge_case_tests.py:369
↓ 1 callersMethodtest_health_check_integration
测试6: 健康检查集成测试(模拟运行)
test_blacklist_integration.py:322
↓ 1 callersFunctiontest_health_check_service
测试健康检查服务
test_real_services_integration.py:40
↓ 1 callersFunctiontest_invalid_parameters
测试无效参数
unit_test/edge_case_tests.py:160
↓ 1 callersFunctiontest_llm_wrapper_imports
测试 LLM_Wrapper 的导入功能
test_simplified_import.py:6
↓ 1 callersMethodtest_loadBalancing_api_key_access
测试3: 验证LoadBalancing能否正确获取API key
test_blacklist_integration.py:155
↓ 1 callersMethodtest_loadBalancing_blacklist_handling
测试4: 验证LoadBalancing对屏蔽模型的处理
test_blacklist_integration.py:189
↓ 1 callersFunctiontest_load_balancing_edge_cases
测试负载均衡边界情况
unit_test/edge_case_tests.py:548
↓ 1 callersFunctiontest_load_balancing_failover
测试负载均衡故障转移
unit_test/comprehensive_test_suite.py:368
↓ 1 callersFunctiontest_loadbalancing_with_blacklist
测试LoadBalancing对屏蔽模型的处理
test_real_services_integration.py:99
↓ 1 callersFunctiontest_model_switching_overhead
测试模型切换开销
unit_test/performance_test.py:274
↓ 1 callersFunctiontest_multimodal_edge_cases
测试多模态边界情况
unit_test/edge_case_tests.py:280
↓ 1 callersFunctiontest_multimodal_models
测试多模态模型
unit_test/comprehensive_test_suite.py:144
↓ 1 callersFunctiontest_multimodal_performance
测试多模态性能
unit_test/performance_test.py:403
↓ 1 callersFunctiontest_package_import
测试包导入功能(需要安装后测试)
test_simplified_import.py:81
↓ 1 callersFunctiontest_pareto_optimal_selection
测试帕累托最优选择
unit_test/comprehensive_test_suite.py:294
↓ 1 callersFunctiontest_stats_endpoint
测试统计信息端点
test_performance.py:231
↓ 1 callersFunctiontest_text_generation_models
测试所有文本生成模型
unit_test/comprehensive_test_suite.py:56
↓ 1 callersFunctiontest_thinking_models
测试推理模型
unit_test/comprehensive_test_suite.py:105
↓ 1 callersFunctionvalidate_mappings
验证所有的模型列表和映射是否一致和互相包含 检查: 1. 所有模型列表中的模型都在source_mapping中 2. 所有配置中的源是否一致(source_config, source_ranking, source_mapping, source_pr
ew_config/source.py:716
↓ 1 callersFunctionworker_process
工作进程函数,模拟多个用户同时请求API密钥
api_key_manager/unit_test.py:250
Method__call__
检查是否允许当前调用,并在允许时记录调用 Returns: bool: 如果允许调用返回True,否则返回False
api_key_manager/unit_test.py:56
Method__init__
初始化LoadBalancing实例,获取健康检查数据和配置
LoadBalancing.py:126
Method__init__
(self)
test_blacklist_integration.py:51
Method__init__
(self, base_url, api_key)
ew_api/openai_infra.py:13
Method__init__
(self, base_url, api_key)
ew_api/curl_infra.py:14
Method__init__
(self)
unit_test/comprehensive_test_suite.py:34
Method__init__
(self)
unit_test/performance_test.py:34
Method__init__
(self)
unit_test/edge_case_tests.py:30
Method__init__
初始化客户端。 参数: base_url: API密钥管理器服务的基础URL
api_key_manager/client.py:9
Method__init__
初始化限流器 Args: max_calls: 在period秒内允许的最大调用次数 period: 时间窗口大小(秒)
api_key_manager/unit_test.py:43
Method__init__
(self)
ew_config/logging_config.py:10
Method__repr__
(self)
api_key_manager/models.py:61
Method_validate_model_is_deepinfra_source
Validate that the model is available on DeepInfra source
LLMwrapper.py:265
Functioncheck_healthy
专门用于Docker健康检查的端点
api_key_manager/api.py:283
Functioncounting_time
(func)
ew_decorator/counting_time.py:5
Functiondecorator
(func)
ew_decorator/with_timeout.py:20
Functiondocker_health_check
专门为Docker健康检查设计的端点,验证服务是否正常运行
CheckHealthy.py:636
Methodformat
(self, record)
ew_config/logging_config.py:52
Methodformat
(self, record)
ew_config/logging_config.py:68
Methodfunction_calling_fromTHEbest
从多个支持函数调用的模型中选择最优的一个 Args: model_list (list): 候选模型名称列表(必须支持函数调用) prompt (str): 输入提示 tools (list):
LLMwrapper.py:1239
Methodgenerate_embedding
生成文本嵌入向量 Args: model_name (str): 模型名称,仅支持embedding模型 prompt (str): 输入文本 test_response (dict, opt
LLMwrapper.py:1527
Methodgenerate_reranker
使用reranker模型对文档进行重新排序 Args: model_name (str): 模型名称,仅支持reranker模型 prompt (str): 查询文本 documents_li
LLMwrapper.py:1654
Functionget_api_key
获取给定源的最佳API密钥。 使用缓存的失败密钥列表,实现高性能的密钥选择。
api_key_manager/api.py:294
Functionget_health_data
Return the sliding window data for all API checks
CheckHealthy.py:616
Functionget_stats
获取API密钥统计信息
api_key_manager/api.py:410
Functionhealth_check
健康检查端点
api_key_manager/api.py:278
Functionlog_requests
记录所有HTTP请求
api_key_manager/api.py:266
Functionmake_request
执行单个请求
unit_test/comprehensive_test_suite.py:406
Functionmonitor_queue
监控队列大小的线程函数
api_key_manager/unit_test.py:445
Functionnotice_api_key
记录API密钥使用信息。
api_key_manager/api.py:370
Functionrefresh_cache
手动刷新失败密钥缓存
api_key_manager/api.py:420
Functionrun_threaded_workers
在一个进程内运行多个线程
api_key_manager/unit_test.py:458
Functionshutdown_event
Shutdown the scheduler when the app stops and save health data to a local file
CheckHealthy.py:587
Functionshutdown_event
关闭定时任务
api_key_manager/api.py:257
Functionstartup_event
Run initial health check and start the scheduler
CheckHealthy.py:562
Functionstartup_event
在启动时初始化数据库表和定时任务
api_key_manager/api.py:212
Methodtest_custom_default_timeout
测试自定义默认超时值
ew_decorator/test_with_timeout.py:55
Methodtest_custom_param_name
测试自定义参数名
ew_decorator/test_with_timeout.py:65
Methodtest_default_timeout
测试默认超时参数
ew_decorator/test_with_timeout.py:49
Functiontest_get_api_key
测试获取API密钥的性能
test_performance.py:62
Methodtest_normal_execution
测试正常执行情况
ew_decorator/test_with_timeout.py:37
Methodtest_timeout_exception
测试超时情况,应该引发TimeoutError
ew_decorator/test_with_timeout.py:43
Functionthread_worker
线程工作函数,用于多线程测试
api_key_manager/unit_test.py:358
Functiontimeout_handler
超时信号处理函数
ew_decorator/with_timeout.py:10
Functiontrigger_health_check
Manually trigger a health check (runs in background)
CheckHealthy.py:629
Functionupdate_health_data
Run the health check and update the sliding window data
CheckHealthy.py:532
Functionwith_timeout
函数超时装饰器 修改为始终使用ThreadPoolExecutor实现超时功能, 因为signal模块只能在主线程中使用。
ew_decorator/with_timeout.py:14
Functionworker
工作线程函数
unit_test/performance_test.py:195
Functionwrapper
(*args, **kwargs)
ew_decorator/with_timeout.py:25
Functionwrapper
(*args, **kwargs)
ew_decorator/counting_time.py:7
← previous101–186 of 186, ranked by callers