diff --git a/swarms/models/anthropic.py b/swarms/models/anthropic.py index 1f47e1bf..1f0fe759 100644 --- a/swarms/models/anthropic.py +++ b/swarms/models/anthropic.py @@ -185,9 +185,11 @@ def build_extra_kwargs( if field_name in extra_kwargs: raise ValueError(f"Found {field_name} supplied twice.") if field_name not in all_required_field_names: - warnings.warn(f"""WARNING! {field_name} is not default parameter. + warnings.warn( + f"""WARNING! {field_name} is not default parameter. {field_name} was transferred to model_kwargs. - Please confirm that {field_name} is what you intended.""") + Please confirm that {field_name} is what you intended.""" + ) extra_kwargs[field_name] = values.pop(field_name) invalid_model_kwargs = all_required_field_names.intersection( diff --git a/swarms/models/dalle3.py b/swarms/models/dalle3.py index 3c130670..419cb060 100644 --- a/swarms/models/dalle3.py +++ b/swarms/models/dalle3.py @@ -168,10 +168,8 @@ class Dalle3: # Handling exceptions and printing the errors details print( colored( - ( - f"Error running Dalle3: {error} try optimizing your api" - " key and or try again" - ), + f"Error running Dalle3: {error} try optimizing your api" + " key and or try again", "red", ) ) @@ -233,10 +231,8 @@ class Dalle3: except (Exception, openai.OpenAIError) as error: print( colored( - ( - f"Error running Dalle3: {error} try optimizing your api" - " key and or try again" - ), + f"Error running Dalle3: {error} try optimizing your api" + " key and or try again", "red", ) ) @@ -310,10 +306,8 @@ class Dalle3: except Exception as error: print( colored( - ( - f"Error running Dalle3: {error} try optimizing" - " your api key and or try again" - ), + f"Error running Dalle3: {error} try optimizing" + " your api key and or try again", "red", ) ) diff --git a/swarms/models/huggingface.py b/swarms/models/huggingface.py index 1db435f5..f3f7d45f 100644 --- a/swarms/models/huggingface.py +++ b/swarms/models/huggingface.py @@ -291,10 +291,8 @@ class HuggingfaceLLM: except Exception as e: print( colored( - ( - "HuggingfaceLLM could not generate text because of" - f" error: {e}, try optimizing your arguments" - ), + "HuggingfaceLLM could not generate text because of" + f" error: {e}, try optimizing your arguments", "red", ) ) diff --git a/swarms/models/ssd_1b.py b/swarms/models/ssd_1b.py index 406678ef..aaa3f17e 100644 --- a/swarms/models/ssd_1b.py +++ b/swarms/models/ssd_1b.py @@ -140,10 +140,8 @@ class SSD1B: # Handling exceptions and printing the errors details print( colored( - ( - f"Error running SSD1B: {error} try optimizing your api" - " key and or try again" - ), + f"Error running SSD1B: {error} try optimizing your api" + " key and or try again", "red", ) ) @@ -228,10 +226,8 @@ class SSD1B: except Exception as error: print( colored( - ( - f"Error running SSD1B: {error} try optimizing" - " your api key and or try again" - ), + f"Error running SSD1B: {error} try optimizing" + " your api key and or try again", "red", ) ) diff --git a/swarms/structs/flow.py b/swarms/structs/flow.py index 18a141a3..99a3e587 100644 --- a/swarms/structs/flow.py +++ b/swarms/structs/flow.py @@ -137,7 +137,7 @@ class Flow: """ Flow is the structure that provides autonomy to any llm in a reliable and effective fashion. The flow structure is designed to be used with any llm and provides the following features: - + Features: * Interactive, AI generates, then user input * Message history and performance history fed -> into context -> truncate if too long @@ -489,10 +489,8 @@ class Flow: except Exception as error: print( colored( - ( - "Error activating autonomous agent. Try optimizing your" - " parameters..." - ), + "Error activating autonomous agent. Try optimizing your" + " parameters...", "red", ) ) @@ -652,7 +650,7 @@ class Flow: while attempt < self.retry_attempts: try: response = self.llm( - task**kwargs, + task ** kwargs, ) if self.interactive: print(f"AI: {response}") diff --git a/swarms/structs/sequential_workflow.py b/swarms/structs/sequential_workflow.py index 753ada15..85990854 100644 --- a/swarms/structs/sequential_workflow.py +++ b/swarms/structs/sequential_workflow.py @@ -385,11 +385,9 @@ class SequentialWorkflow: except Exception as e: print( colored( - ( - f"Error initializing the Sequential workflow: {e} try" - " optimizing your inputs like the flow class and task" - " description" - ), + f"Error initializing the Sequential workflow: {e} try" + " optimizing your inputs like the flow class and task" + " description", "red", attrs=["bold", "underline"], ) diff --git a/tests/agents/idea_to_image.py b/tests/agents/test_idea_to_image.py similarity index 100% rename from tests/agents/idea_to_image.py rename to tests/agents/test_idea_to_image.py diff --git a/tests/agents/omni_modal.py b/tests/agents/test_omni_modal.py similarity index 100% rename from tests/agents/omni_modal.py rename to tests/agents/test_omni_modal.py diff --git a/tests/embeddings/pegasus.py b/tests/embeddings/test_pegasus.py similarity index 100% rename from tests/embeddings/pegasus.py rename to tests/embeddings/test_pegasus.py diff --git a/tests/memory/main.py b/tests/memory/test_main.py similarity index 100% rename from tests/memory/main.py rename to tests/memory/test_main.py diff --git a/tests/memory/oceandb.py b/tests/memory/test_oceandb.py similarity index 100% rename from tests/memory/oceandb.py rename to tests/memory/test_oceandb.py diff --git a/tests/memory/pg.py b/tests/memory/test_pg.py similarity index 100% rename from tests/memory/pg.py rename to tests/memory/test_pg.py diff --git a/tests/memory/pinecone.py b/tests/memory/test_pinecone.py similarity index 100% rename from tests/memory/pinecone.py rename to tests/memory/test_pinecone.py diff --git a/tests/models/LLM.py b/tests/models/test_LLM.py similarity index 100% rename from tests/models/LLM.py rename to tests/models/test_LLM.py diff --git a/tests/models/ada.py b/tests/models/test_ada.py similarity index 100% rename from tests/models/ada.py rename to tests/models/test_ada.py diff --git a/tests/models/anthropic.py b/tests/models/test_anthropic.py similarity index 100% rename from tests/models/anthropic.py rename to tests/models/test_anthropic.py diff --git a/tests/models/auto_temp.py b/tests/models/test_auto_temp.py similarity index 100% rename from tests/models/auto_temp.py rename to tests/models/test_auto_temp.py diff --git a/tests/models/bingchat.py b/tests/models/test_bingchat.py similarity index 100% rename from tests/models/bingchat.py rename to tests/models/test_bingchat.py diff --git a/tests/models/bioclip.py b/tests/models/test_bioclip.py similarity index 100% rename from tests/models/bioclip.py rename to tests/models/test_bioclip.py diff --git a/tests/models/biogpt.py b/tests/models/test_biogpt.py similarity index 100% rename from tests/models/biogpt.py rename to tests/models/test_biogpt.py diff --git a/tests/models/cohere.py b/tests/models/test_cohere.py similarity index 100% rename from tests/models/cohere.py rename to tests/models/test_cohere.py diff --git a/tests/models/dalle3.py b/tests/models/test_dalle3.py similarity index 100% rename from tests/models/dalle3.py rename to tests/models/test_dalle3.py diff --git a/tests/models/distill_whisper.py b/tests/models/test_distill_whisper.py similarity index 100% rename from tests/models/distill_whisper.py rename to tests/models/test_distill_whisper.py diff --git a/tests/models/distilled_whisperx.py b/tests/models/test_distilled_whisperx.py similarity index 100% rename from tests/models/distilled_whisperx.py rename to tests/models/test_distilled_whisperx.py diff --git a/tests/models/elevenlab.py b/tests/models/test_elevenlab.py similarity index 100% rename from tests/models/elevenlab.py rename to tests/models/test_elevenlab.py diff --git a/tests/models/fuyu.py b/tests/models/test_fuyu.py similarity index 100% rename from tests/models/fuyu.py rename to tests/models/test_fuyu.py diff --git a/tests/models/gpt4v.py b/tests/models/test_gpt4v.py similarity index 100% rename from tests/models/gpt4v.py rename to tests/models/test_gpt4v.py diff --git a/tests/models/hf.py b/tests/models/test_hf.py similarity index 100% rename from tests/models/hf.py rename to tests/models/test_hf.py diff --git a/tests/models/huggingface.py b/tests/models/test_huggingface.py similarity index 100% rename from tests/models/huggingface.py rename to tests/models/test_huggingface.py diff --git a/tests/models/idefics.py b/tests/models/test_idefics.py similarity index 100% rename from tests/models/idefics.py rename to tests/models/test_idefics.py diff --git a/tests/models/jina_embeds.py b/tests/models/test_jina_embeds.py similarity index 100% rename from tests/models/jina_embeds.py rename to tests/models/test_jina_embeds.py diff --git a/tests/models/kosmos.py b/tests/models/test_kosmos.py similarity index 100% rename from tests/models/kosmos.py rename to tests/models/test_kosmos.py diff --git a/tests/models/kosmos2.py b/tests/models/test_kosmos2.py similarity index 100% rename from tests/models/kosmos2.py rename to tests/models/test_kosmos2.py diff --git a/tests/models/llama_function_caller.py b/tests/models/test_llama_function_caller.py similarity index 100% rename from tests/models/llama_function_caller.py rename to tests/models/test_llama_function_caller.py diff --git a/tests/models/mistral.py b/tests/models/test_mistral.py similarity index 100% rename from tests/models/mistral.py rename to tests/models/test_mistral.py diff --git a/tests/models/mpt7b.py b/tests/models/test_mpt7b.py similarity index 100% rename from tests/models/mpt7b.py rename to tests/models/test_mpt7b.py diff --git a/tests/models/nougat.py b/tests/models/test_nougat.py similarity index 100% rename from tests/models/nougat.py rename to tests/models/test_nougat.py diff --git a/tests/models/revgptv1.py b/tests/models/test_revgptv1.py similarity index 100% rename from tests/models/revgptv1.py rename to tests/models/test_revgptv1.py diff --git a/tests/models/revgptv4.py b/tests/models/test_revgptv4.py similarity index 100% rename from tests/models/revgptv4.py rename to tests/models/test_revgptv4.py diff --git a/tests/models/speech_t5.py b/tests/models/test_speech_t5.py similarity index 100% rename from tests/models/speech_t5.py rename to tests/models/test_speech_t5.py diff --git a/tests/models/ssd_1b.py b/tests/models/test_ssd_1b.py similarity index 100% rename from tests/models/ssd_1b.py rename to tests/models/test_ssd_1b.py diff --git a/tests/models/timm_model.py b/tests/models/test_timm_model.py similarity index 100% rename from tests/models/timm_model.py rename to tests/models/test_timm_model.py diff --git a/tests/models/vilt.py b/tests/models/test_vilt.py similarity index 100% rename from tests/models/vilt.py rename to tests/models/test_vilt.py diff --git a/tests/models/whisperx.py b/tests/models/test_whisperx.py similarity index 100% rename from tests/models/whisperx.py rename to tests/models/test_whisperx.py diff --git a/tests/models/yi_200k.py b/tests/models/test_yi_200k.py similarity index 100% rename from tests/models/yi_200k.py rename to tests/models/test_yi_200k.py diff --git a/tests/structs/flow.py b/tests/structs/test_flow.py similarity index 100% rename from tests/structs/flow.py rename to tests/structs/test_flow.py diff --git a/tests/structs/nonlinear_workflow.py b/tests/structs/test_nonlinear_workflow.py similarity index 100% rename from tests/structs/nonlinear_workflow.py rename to tests/structs/test_nonlinear_workflow.py diff --git a/tests/structs/sequential_workflow.py b/tests/structs/test_sequential_workflow.py similarity index 100% rename from tests/structs/sequential_workflow.py rename to tests/structs/test_sequential_workflow.py diff --git a/tests/structs/workflow.py b/tests/structs/test_workflow.py similarity index 100% rename from tests/structs/workflow.py rename to tests/structs/test_workflow.py diff --git a/tests/swarms/autoscaler.py b/tests/swarms/test_autoscaler.py similarity index 100% rename from tests/swarms/autoscaler.py rename to tests/swarms/test_autoscaler.py diff --git a/tests/swarms/dialogue_simulator.py b/tests/swarms/test_dialogue_simulator.py similarity index 100% rename from tests/swarms/dialogue_simulator.py rename to tests/swarms/test_dialogue_simulator.py diff --git a/tests/swarms/godmode.py b/tests/swarms/test_godmode.py similarity index 100% rename from tests/swarms/godmode.py rename to tests/swarms/test_godmode.py diff --git a/tests/swarms/groupchat.py b/tests/swarms/test_groupchat.py similarity index 100% rename from tests/swarms/groupchat.py rename to tests/swarms/test_groupchat.py diff --git a/tests/swarms/multi_agent_collab.py b/tests/swarms/test_multi_agent_collab.py similarity index 100% rename from tests/swarms/multi_agent_collab.py rename to tests/swarms/test_multi_agent_collab.py diff --git a/tests/swarms/multi_agent_debate.py b/tests/swarms/test_multi_agent_debate.py similarity index 100% rename from tests/swarms/multi_agent_debate.py rename to tests/swarms/test_multi_agent_debate.py diff --git a/tests/swarms/orchestrate.py b/tests/swarms/test_orchestrate.py similarity index 100% rename from tests/swarms/orchestrate.py rename to tests/swarms/test_orchestrate.py diff --git a/tests/swarms/simple_swarm.py b/tests/swarms/test_simple_swarm.py similarity index 100% rename from tests/swarms/simple_swarm.py rename to tests/swarms/test_simple_swarm.py diff --git a/tests/tools/base.py b/tests/tools/test_base.py similarity index 100% rename from tests/tools/base.py rename to tests/tools/test_base.py diff --git a/tests/utils/subprocess_code_interpreter.py b/tests/utils/test_subprocess_code_interpreter.py similarity index 100% rename from tests/utils/subprocess_code_interpreter.py rename to tests/utils/test_subprocess_code_interpreter.py