parent
abcb5821e2
commit
6496feff10
@ -0,0 +1,13 @@
|
|||||||
|
from swarms.structs.deep_research_swarm import DeepResearchSwarm
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
swarm = DeepResearchSwarm(
|
||||||
|
name="Deep Research Swarm",
|
||||||
|
description="A swarm of agents that can perform deep research on a given topic",
|
||||||
|
)
|
||||||
|
|
||||||
|
swarm.run("What are the latest news in the AI an crypto space")
|
||||||
|
|
||||||
|
|
||||||
|
main()
|
@ -0,0 +1,23 @@
|
|||||||
|
from swarms.structs.deep_research_swarm import DeepResearchSwarm
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
swarm = DeepResearchSwarm(
|
||||||
|
name="Deep Research Swarm",
|
||||||
|
description="A swarm of agents that can perform deep research on a given topic",
|
||||||
|
output_type="string", # Change to string output type for better readability
|
||||||
|
)
|
||||||
|
|
||||||
|
# Format the query as a proper question
|
||||||
|
query = "What are the latest developments and news in the AI and cryptocurrency space?"
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = swarm.run(query)
|
||||||
|
print("\nResearch Results:")
|
||||||
|
print(result)
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Error occurred: {str(e)}")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
@ -1,8 +0,0 @@
|
|||||||
from swarms.structs.long_agent import LongAgent
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
long_agent = LongAgent(
|
|
||||||
token_count_per_agent=3000, output_type="final"
|
|
||||||
)
|
|
||||||
print(long_agent.run([""]))
|
|
@ -1,20 +0,0 @@
|
|||||||
from swarms import ReasoningAgentRouter
|
|
||||||
|
|
||||||
|
|
||||||
calculus_router = ReasoningAgentRouter(
|
|
||||||
agent_name="calculus-expert",
|
|
||||||
description="A calculus problem solving agent",
|
|
||||||
model_name="gpt-4o-mini",
|
|
||||||
system_prompt="You are a calculus expert. Solve differentiation and integration problems methodically.",
|
|
||||||
swarm_type="self-consistency",
|
|
||||||
num_samples=3, # Generate 3 samples to ensure consistency
|
|
||||||
output_type="list",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Example calculus problem
|
|
||||||
calculus_problem = "Find the derivative of f(x) = x³ln(x) - 5x²"
|
|
||||||
|
|
||||||
# Get the solution
|
|
||||||
solution = calculus_router.run(calculus_problem)
|
|
||||||
print(solution)
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue