-
-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interactive UI for Swarms Framework #733
base: master
Are you sure you want to change the base?
Conversation
elif swarm_type in ["SequentialWorkflow", "ConcurrentWorkflow"]: | ||
return parse_sequential_workflow_output(data, error_display) | ||
elif swarm_type == "SpreadSheetSwarm": | ||
if os.path.exists(data): |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
return f"Error: 'steps' data is None at index {i}" | ||
|
||
if not isinstance(agent_output["steps"], list): | ||
logger.error(f"Error: 'steps' data is not a list at index {i}") |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
@@ -0,0 +1,1889 @@ | |||
import subprocess | |||
import sys |
Check failure
Code scanning / Pyre
Undefined import Error
|
||
# Package installation function | ||
def install_and_import_packages(): | ||
"""Auto-install and import required packages.""" |
Check failure
Code scanning / Pyre
Undefined import Error
'python-dotenv': 'dotenv', | ||
'swarms': 'swarms', | ||
'cryptography': 'cryptography', | ||
'darkdetect': 'darkdetect' |
Check failure
Code scanning / Pyre
Undefined import Error
|
||
agent = Agent( | ||
agent_name=agent_name, | ||
system_prompt=agent_prompt, |
Check failure
Code scanning / Pyre
Incompatible variable type Error
system_prompt=agent_prompt, | ||
llm=llm, | ||
max_loops=1, | ||
autosave=True, |
Check failure
Code scanning / Pyre
Incompatible variable type Error
if isinstance(result,dict): | ||
result = json.dumps( | ||
{ | ||
"input" : { |
Check failure
Code scanning / Pyre
Uninitialized local Error
return | ||
except asyncio.TimeoutError as e: | ||
logger.error(f"Task execution timed out after {timeout} seconds", exc_info=True) | ||
yield f"Task execution timed out after {timeout} seconds", gr.update(visible=True), "" |
Check failure
Code scanning / Pyre
Uninitialized local Error
logger.error(f"Task execution timed out after {timeout} seconds", exc_info=True) | ||
yield f"Task execution timed out after {timeout} seconds", gr.update(visible=True), "" | ||
return | ||
except litellm.exceptions.APIError as e: # Catch litellm APIError |
Check failure
Code scanning / Pyre
Invalid except clause Error
logger.error(f"LiteLLM API Error: {e}", exc_info=True) | ||
yield f"LiteLLM API Error: {e}", gr.update(visible=True), "" | ||
return | ||
except litellm.exceptions.AuthenticationError as e: # Catch litellm AuthenticationError |
Check failure
Code scanning / Pyre
Invalid except clause Error
|
||
@staticmethod | ||
def create_ui_theme(primary_color="red"): | ||
import darkdetect # First install: pip install darkdetect |
Check failure
Code scanning / Pyre
Undefined import Error
Interactive UI for Swarms Framework: Swarm-Specific Parsing, Agent Management, and LLM Integration with Hugging Face Deployment & Local Deployment
Description:
SequentialWorkflow
,ConcurrentWorkflow
,AgentRearrange
,MixtureOfAgents
,SpreadSheetSwarm
, andauto
.UI
class for streamlined Gradio component management, improving scalability and readability of the codebase.Key Features:
AgentRearrange
and advanced features like agent flow validation.Issue:
Dependencies:
Deployment:
Tag Maintainer:
@kyegomez
Twitter Handle:
@harshalmore31
Additional Changes:
spreadsheet_swarm.py
is modified accordingly for the working of UI📚 Documentation preview 📚: https://swarms--733.org.readthedocs.build/en/733/