From a178953a6c13f2501d0105881f886891ab7f8bf2 Mon Sep 17 00:00:00 2001 From: Kye Date: Fri, 6 Oct 2023 02:12:35 -0400 Subject: [PATCH] clean up playground --- playground/{ => agents}/mm_agent_example.py | 0 playground/{ => agents}/omni_exa_example.py | 0 playground/{ => swarms}/autoscaler.py | 0 playground/{ => swarms}/chat.py | 0 playground/{ => swarms}/debate.py | 0 playground/{ => swarms}/dialogue_simulator.py | 0 playground/{ => swarms}/easy_example.py | 0 playground/{ => swarms}/godmode.py | 0 playground/{ => swarms}/gui_app.py | 0 playground/{ => swarms}/multi_agent_collab.py | 0 playground/{ => swarms}/multi_agent_debate.py | 0 playground/{ => swarms}/orchestrate.py | 0 playground/{ => swarms}/orchestrator.py | 0 playground/{ => swarms}/social_app.py | 0 playground/{ => swarms}/swarms_example.py | 0 playground/{ => swarms}/todo_app.py | 0 playground/{ => worker}/ultranode_example.py | 0 playground/{ => worker}/worker_auto.py | 0 playground/{ => worker}/worker_ultra.py | 0 pyproject.toml | 2 +- swarms/models/mistral.py | 7 +++++-- 21 files changed, 6 insertions(+), 3 deletions(-) rename playground/{ => agents}/mm_agent_example.py (100%) rename playground/{ => agents}/omni_exa_example.py (100%) rename playground/{ => swarms}/autoscaler.py (100%) rename playground/{ => swarms}/chat.py (100%) rename playground/{ => swarms}/debate.py (100%) rename playground/{ => swarms}/dialogue_simulator.py (100%) rename playground/{ => swarms}/easy_example.py (100%) rename playground/{ => swarms}/godmode.py (100%) rename playground/{ => swarms}/gui_app.py (100%) rename playground/{ => swarms}/multi_agent_collab.py (100%) rename playground/{ => swarms}/multi_agent_debate.py (100%) rename playground/{ => swarms}/orchestrate.py (100%) rename playground/{ => swarms}/orchestrator.py (100%) rename playground/{ => swarms}/social_app.py (100%) rename playground/{ => swarms}/swarms_example.py (100%) rename playground/{ => swarms}/todo_app.py (100%) rename playground/{ => worker}/ultranode_example.py (100%) rename playground/{ => worker}/worker_auto.py (100%) rename playground/{ => worker}/worker_ultra.py (100%) diff --git a/playground/mm_agent_example.py b/playground/agents/mm_agent_example.py similarity index 100% rename from playground/mm_agent_example.py rename to playground/agents/mm_agent_example.py diff --git a/playground/omni_exa_example.py b/playground/agents/omni_exa_example.py similarity index 100% rename from playground/omni_exa_example.py rename to playground/agents/omni_exa_example.py diff --git a/playground/autoscaler.py b/playground/swarms/autoscaler.py similarity index 100% rename from playground/autoscaler.py rename to playground/swarms/autoscaler.py diff --git a/playground/chat.py b/playground/swarms/chat.py similarity index 100% rename from playground/chat.py rename to playground/swarms/chat.py diff --git a/playground/debate.py b/playground/swarms/debate.py similarity index 100% rename from playground/debate.py rename to playground/swarms/debate.py diff --git a/playground/dialogue_simulator.py b/playground/swarms/dialogue_simulator.py similarity index 100% rename from playground/dialogue_simulator.py rename to playground/swarms/dialogue_simulator.py diff --git a/playground/easy_example.py b/playground/swarms/easy_example.py similarity index 100% rename from playground/easy_example.py rename to playground/swarms/easy_example.py diff --git a/playground/godmode.py b/playground/swarms/godmode.py similarity index 100% rename from playground/godmode.py rename to playground/swarms/godmode.py diff --git a/playground/gui_app.py b/playground/swarms/gui_app.py similarity index 100% rename from playground/gui_app.py rename to playground/swarms/gui_app.py diff --git a/playground/multi_agent_collab.py b/playground/swarms/multi_agent_collab.py similarity index 100% rename from playground/multi_agent_collab.py rename to playground/swarms/multi_agent_collab.py diff --git a/playground/multi_agent_debate.py b/playground/swarms/multi_agent_debate.py similarity index 100% rename from playground/multi_agent_debate.py rename to playground/swarms/multi_agent_debate.py diff --git a/playground/orchestrate.py b/playground/swarms/orchestrate.py similarity index 100% rename from playground/orchestrate.py rename to playground/swarms/orchestrate.py diff --git a/playground/orchestrator.py b/playground/swarms/orchestrator.py similarity index 100% rename from playground/orchestrator.py rename to playground/swarms/orchestrator.py diff --git a/playground/social_app.py b/playground/swarms/social_app.py similarity index 100% rename from playground/social_app.py rename to playground/swarms/social_app.py diff --git a/playground/swarms_example.py b/playground/swarms/swarms_example.py similarity index 100% rename from playground/swarms_example.py rename to playground/swarms/swarms_example.py diff --git a/playground/todo_app.py b/playground/swarms/todo_app.py similarity index 100% rename from playground/todo_app.py rename to playground/swarms/todo_app.py diff --git a/playground/ultranode_example.py b/playground/worker/ultranode_example.py similarity index 100% rename from playground/ultranode_example.py rename to playground/worker/ultranode_example.py diff --git a/playground/worker_auto.py b/playground/worker/worker_auto.py similarity index 100% rename from playground/worker_auto.py rename to playground/worker/worker_auto.py diff --git a/playground/worker_ultra.py b/playground/worker/worker_ultra.py similarity index 100% rename from playground/worker_ultra.py rename to playground/worker/worker_ultra.py diff --git a/pyproject.toml b/pyproject.toml index d3bcdc79..51d096c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "1.7.6" +version = "1.7.7" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] diff --git a/swarms/models/mistral.py b/swarms/models/mistral.py index b0ef5ccc..d822e278 100644 --- a/swarms/models/mistral.py +++ b/swarms/models/mistral.py @@ -47,9 +47,12 @@ class Mistral: task: str ): """Run the model on a given task.""" - + try: - model_inputs = self.tokenizer([task], return_tensors="pt").to(self.device) + model_inputs = self.tokenizer( + [task], + return_tensors="pt" + ).to(self.device) generated_ids = self.model.generate( **model_inputs, max_length=self.max_length,