From 6b614e8ff8db1d6d38a97794bab5414a44dfe23d Mon Sep 17 00:00:00 2001 From: Kye Date: Sat, 9 Sep 2023 14:52:37 -0400 Subject: [PATCH] clean up `Anthropic` Former-commit-id: 1a1c5ad74bb0cd36cede39371ed8af45bb37ce78 --- example.py | 2 +- swarms/models/anthropic.py | 11 ++++++++++- swarms/orchestrator/autoscaler.py | 1 - swarms/utils/task.py | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/example.py b/example.py index 632a01c4..5cce3234 100644 --- a/example.py +++ b/example.py @@ -2,7 +2,7 @@ from swarms import Worker node = Worker( - openai_api_key="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", + openai_api_key="", ai_name="Optimus Prime", ) diff --git a/swarms/models/anthropic.py b/swarms/models/anthropic.py index 47b43db8..f9437c78 100644 --- a/swarms/models/anthropic.py +++ b/swarms/models/anthropic.py @@ -4,7 +4,16 @@ import os class Anthropic: """Anthropic large language models.""" - def __init__(self, model="claude-2", max_tokens_to_sample=256, temperature=None, top_k=None, top_p=None, streaming=False, default_request_timeout=None): + def __init__( + self, + model="claude-2", + max_tokens_to_sample=256, + temperature=None, + top_k=None, + top_p=None, + streaming=False, + default_request_timeout=None + ): self.model = model self.max_tokens_to_sample = max_tokens_to_sample self.temperature = temperature diff --git a/swarms/orchestrator/autoscaler.py b/swarms/orchestrator/autoscaler.py index 181651ca..7fe5e12c 100644 --- a/swarms/orchestrator/autoscaler.py +++ b/swarms/orchestrator/autoscaler.py @@ -8,7 +8,6 @@ from swarms.utils.decorators import error_decorator, log_decorator, timing_decor # TODO Handle task assignment and task delegation # TODO: User task => decomposed into very small sub tasks => sub tasks assigned to workers => workers complete and update the swarm, can ask for help from other agents. # TODO: Missing, Task Assignment, Task delegation, Task completion, Swarm level communication with vector db -# class AutoScaler: @log_decorator diff --git a/swarms/utils/task.py b/swarms/utils/task.py index 2d7f56e0..512b30fa 100644 --- a/swarms/utils/task.py +++ b/swarms/utils/task.py @@ -1,5 +1,6 @@ import uuid + class Task: def __init__(self, objective, priority=0, schedule=None, dependencies=None): self.id = uuid.uuid4()