Paper - Pytorch
Project description
Forest of thoughts
Install
Usage
import os
from swarms import OpenAIChat, Mixtral
from fot.main import ForestOfAgents
from dotenv import load_dotenv
# Load env
load_dotenv()
# OpenAI API key
api_key = os.getenv("OPENAI_API_KEY")
# create llm
openai = OpenAIChat(openai_api_base=api_key)
llm = Mixtral(max_new_tokens=3000, load_in_4bit=True)
# Create a forest of agents
forest = ForestOfAgents(
openai, num_agents=5, max_loops=1, max_new_tokens=100
)
# Distribute tasks to the agents
forest.run("What is the meaning of life?")
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for forest_of_thoughts-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b92c36484e68f400db97d1b3735fcf3b2ca0b8bfffbbce0ab3c0a1268000480 |
|
MD5 | 98b26eb04ed9c644c6c408c9db1315c8 |
|
BLAKE2b-256 | d358f2a21bddc01daaf4735c4ce90cdf4585c90a62abf6446339871082a6b027 |