You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
550 B
23 lines
550 B
from swarms.structs.llm_council import LLMCouncil
|
|
|
|
# Create the council
|
|
council = LLMCouncil(verbose=True)
|
|
|
|
# Example query
|
|
query = "What are the top five best energy stocks across nuclear, solar, gas, and other energy sources?"
|
|
|
|
# Run the council
|
|
result = council.run(query)
|
|
|
|
# Print final response
|
|
print(result["final_response"])
|
|
|
|
# Optionally print evaluations
|
|
for name, evaluation in result["evaluations"].items():
|
|
print(f"\n{name}:")
|
|
print(
|
|
evaluation[:500] + "..."
|
|
if len(evaluation) > 500
|
|
else evaluation
|
|
)
|