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
File details
Details for the file forest_of_thoughts-0.0.2.tar.gz
.
File metadata
- Download URL: forest_of_thoughts-0.0.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4fd35220fe3fe017c3b5ebd754bf4eca8d6119021c67af5f642658d227e3282 |
|
MD5 | 615e26e7ecffc760916c5f72590473a8 |
|
BLAKE2b-256 | 7fd3c6b22b234d4c06d226b0f374ecba0cf2c0418907cc8ca431a4d38a141006 |
File details
Details for the file forest_of_thoughts-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: forest_of_thoughts-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b92c36484e68f400db97d1b3735fcf3b2ca0b8bfffbbce0ab3c0a1268000480 |
|
MD5 | 98b26eb04ed9c644c6c408c9db1315c8 |
|
BLAKE2b-256 | d358f2a21bddc01daaf4735c4ce90cdf4585c90a62abf6446339871082a6b027 |