From 03df67052ec2e43445312d3b9410e3177c69f9d9 Mon Sep 17 00:00:00 2001 From: Kye Date: Tue, 26 Sep 2023 16:41:00 -0400 Subject: [PATCH] env Former-commit-id: d169ed43117ab5408e7404583efe1955b0423fbe --- .env.example | 3 +++ swarms/swarms/groupchat.py | 4 +++- swarms/workers/worker.py | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 7e832406..eee83ce0 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,7 @@ OPENAI_API_KEY="your_openai_api_key_here" +GOOGLE_API_KEY="" +ANTHROPIC_API_KEY="" + WOLFRAM_ALPHA_APPID="your_wolfram_alpha_appid_here" ZAPIER_NLA_API_KEY="your_zapier_nla_api_key_here" diff --git a/swarms/swarms/groupchat.py b/swarms/swarms/groupchat.py index 3da4d7a1..2e8dca03 100644 --- a/swarms/swarms/groupchat.py +++ b/swarms/swarms/groupchat.py @@ -1,8 +1,10 @@ -from dataclasses import dataclass import sys +from dataclasses import dataclass from typing import Dict, List, Optional, Union + from swarms.workers.worker import Worker + @dataclass class GroupChat: """A group chat with multiple participants with a list of agents and a max number of rounds""" diff --git a/swarms/workers/worker.py b/swarms/workers/worker.py index fb9bfa94..f4651b9d 100644 --- a/swarms/workers/worker.py +++ b/swarms/workers/worker.py @@ -104,6 +104,11 @@ class Worker: """ self.message_history = ["Here is the conversation so far"] + @property + def name(self): + return self.ai_name + + def receieve(self, name: str, message: str) -> None: """ Receive a message and update the message history.