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
Metadata
Release files for forest-of-thoughts 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| forest_of_thoughts-0.0.2.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| forest_of_thoughts-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.1 kB
Release files / forest_of_thoughts-0.0.2.tar.gz
| Download URL | forest_of_thoughts-0.0.2.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4fd35220fe3fe017c3b5ebd754bf4eca8d6119021c67af5f642658d227e3282
|
|
BLAKE2b-256 checksum How to use checksums |
7fd3c6b22b234d4c06d226b0f374ecba0cf2c0418907cc8ca431a4d38a141006
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0
|
Release files / forest_of_thoughts-0.0.2-py3-none-any.whl
| Download URL | forest_of_thoughts-0.0.2-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b92c36484e68f400db97d1b3735fcf3b2ca0b8bfffbbce0ab3c0a1268000480
|
|
BLAKE2b-256 checksum How to use checksums |
d358f2a21bddc01daaf4735c4ce90cdf4585c90a62abf6446339871082a6b027
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0
|