Skip to content
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 #713

Closed
wants to merge 15 commits into from

Conversation

harshalmore31
Copy link

@harshalmore31 harshalmore31 commented Jan 2, 2025

Interactive UI for Swarms Framework: Swarm-Specific Parsing, Agent Management, and LLM Integration with Hugging Face Deployment & Local Deployment

Description:

  • Developed a robust and feature-rich UI for the Swarms framework using Gradio, focused on enhancing usability, modularity, and interactive capabilities. Key additions include:
    • Swarm-Specific Parsing:
      • Implemented parsers for all swarm types, including SequentialWorkflow, ConcurrentWorkflow, AgentRearrange, MixtureOfAgents, SpreadSheetSwarm, and auto.
      • Ensures consistent formatting of output data and detailed feedback for each workflow type.
    • Dynamic Prompt Loading:
      • Integrated functionality to load agent prompts dynamically from a JSON file.
      • Default prompts are used if the file is absent or improperly formatted.
    • Agent Management in UI:
      • Enabled creation of new agent prompts directly via the UI.
      • Supports editing and validation of custom prompts with seamless integration into the workflow configuration.
    • UI Framework Enhancements:
      • Introduced a dedicated UI class for streamlined Gradio component management, improving scalability and readability of the codebase.
      • Added modular components like dropdowns, sliders, and conditional inputs for an intuitive user experience.
    • LLM Integration:
      • Using LiteLLM, integrated the following models and providers:
        • OpenAI
        • Anthropic
        • Cohere
        • Gemini
        • Mistral
        • Groq
        • Perplexity

Key Features:

  • Interactive Swarm Configuration: Supports flexible configuration for workflows, including custom execution flows for AgentRearrange and advanced features like agent flow validation.
  • Agent-Centric Design: Facilitates agent selection, prompt management, and dynamic updates for added flexibility.
  • User Feedback and Debugging: Incorporates detailed logging, error handling, and status displays for enhanced user experience.

Issue:

  • Not linked to any specific issue. This PR focuses on establishing a functional and scalable UI layer for the Swarms framework.

Dependencies:

  • Gradio: Core framework for building the modular UI.
  • dotenv: Securely manages API keys and configurations.
  • litellm: Enables seamless integration with multiple language model providers and their respective models.

Deployment:

Tag Maintainer:

@kyegomez

Twitter Handle:

@harshalmore31


Additional Changes:

  • spreadsheet_swarm.py is modified accordingly for the working of UI


📚 Documentation preview 📚: https://swarms--713.org.readthedocs.build/en/713/

dependabot bot and others added 13 commits December 30, 2024 10:25
Updates the requirements on [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) to permit the latest version.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](facelessuser/pymdown-extensions@10.12...10.13)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
remove duplicate OPENAI_API_KEY
…-0.0.249-and-lt-0.8.5

Update ruff requirement from <0.4.5,>=0.0.249 to >=0.0.249,<0.8.5
…extensions-approx-eq-10.13

Update pymdown-extensions requirement from ~=10.12 to ~=10.13
@github-actions github-actions bot added documentation Improvements or additions to documentation structs labels Jan 2, 2025
.env.example Outdated
Comment on lines 18 to 33
<<<<<<< HEAD
FIREWORKS_API_KEY=""
ANTHROPIC_API_KEY=your_anthropic_api_key
AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint
AZURE_OPENAI_DEPLOYMENT=your_azure_openai_deployment
OPENAI_API_VERSION=your_openai_api_version
AZURE_OPENAI_API_KEY=your_azure_openai_api_key
AZURE_OPENAI_AD_TOKEN=your_azure_openai_ad_token
=======
ANTHROPIC_API_KEY="your_anthropic_api_key"
AZURE_OPENAI_ENDPOINT="your_azure_openai_endpoint"
AZURE_OPENAI_DEPLOYMENT="your_azure_openai_deployment"
OPENAI_API_VERSION="your_openai_api_version"
AZURE_OPENAI_API_KEY="your_azure_openai_api_key"
AZURE_OPENAI_AD_TOKEN="your_azure_openai_ad_token"
>>>>>>> upstream/master

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to resolve the Git conflicts before to push the changes, can you remove the git delimiters and update the branch pushing a new commit please?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants