Skip to main content

Paper - Pytorch

Project description

Multi-Modality

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

forest_of_thoughts-0.0.2.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

forest_of_thoughts-0.0.2-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page