agentchat.contrib.captainagent.tools.math
agentchat.contrib.captainagent.tools.math.sum_of_primes_below
Installation
Tutorials
User Guide
- Code Execution
- OpenAI Assistant
- GroupChat
- Using Non-OpenAI Models
- CaptainAgent
- Handling Long Contexts
- LLM Caching
- Agent Observability
- LLM Configuration
- Prompting and Reasoning
- Retrieval Augmentation
- Swarm Orchestration
- Task Decomposition
- FAQ
API Reference
- agentchat
- agentchat.contrib
- agentchat.contrib.agent_eval
- agentchat.contrib.capabilities
- agentchat.contrib.captainagent
- agentchat.contrib.captainagent.tools
- agentchat.contrib.captainagent.tools.data_analysis
- agentchat.contrib.captainagent.tools.information_retrieval
- agentchat.contrib.captainagent.tools.math
- calculate_circle_area_from_diameter
- calculate_day_of_the_week
- calculate_fraction_sum
- calculate_matrix_power
- calculate_reflected_point
- complex_numbers_product
- compute_currency_conversion
- count_distinct_permutations
- evaluate_expression
- find_continuity_point
- fraction_to_mixed_numbers
- modular_inverse_sum
- simplify_mixed_numbers
- sum_of_digit_factorials
- sum_of_primes_below
- agentchat.contrib.graph_rag
- agentchat.contrib.vectordb
- agent_builder
- agent_optimizer
- captainagent
- gpt_assistant_agent
- img_utils
- llamaindex_conversable_agent
- llava_agent
- math_user_proxy_agent
- multimodal_conversable_agent
- qdrant_retrieve_user_proxy_agent
- reasoning_agent
- retrieve_assistant_agent
- retrieve_user_proxy_agent
- society_of_mind_agent
- swarm_agent
- text_analyzer_agent
- tool_retriever
- web_surfer
- agentchat.realtime_agent
- agent
- assistant_agent
- chat
- conversable_agent
- groupchat
- user_proxy_agent
- utils
- cache
- coding
- interop
- io
- logger
- oai
- tools
- browser_utils
- code_utils
- exception_utils
- function_utils
- graph_utils
- math_utils
- retrieve_utils
- runtime_logging
- token_count_utils
AutoGen Studio
Ecosystem
agentchat.contrib.captainagent.tools.math
agentchat.contrib.captainagent.tools.math.sum_of_primes_below
sum_of_primes_below
def sum_of_primes_below(threshold)
Calculates the sum of all prime numbers below a given threshold.
Arguments:
threshold
int - The maximum number (exclusive) up to which primes are summed.
Returns:
int
- The sum of all prime numbers below the threshold.
On this page