Package: dspygen
DSPyGen: Streamlining AI DevelopmentDSPyGen, influenced by the efficiency and modularity of Ruby on Rails, is a powerful command-line interface (CLI) designed to revolutionize AI development by leveraging DSPy modules. This tool simplifies the process of creating, developing, and deploying language model (LM) pipelines, embodying the Ruby on Rails philosophy of "Convention over Configuration" for AI projects.Custom GPTDSPyGen 2024.2.26FeaturesQuick Initialization: Set up your DSPyGen project in seconds, echoing Ruby on Rails' ease of starting new projects.Modular Approach: Inspired by Ruby on Rails' modular design, DSPyGen allows for the easy generation and enhancement of DSPy modules.Intuitive Command Structure: With user-friendly commands, managing your AI development workflow becomes as straightforward as web development with Ruby on Rails.Embedded Chatbot Assistance: For guidance and support, DSPyGen includes a chatbot, making it easier to navigate through your development process.Getting StartedEnsure Python is installed on your system. Install DSPyGen via pip:pipinstalldspygenEnhance your experience with shell completion by using the--install-completionoption.UsingPython package: to add and install this package as a dependency of your project, runpoetry add dspygen.Python CLI: to view this app's CLI commands once it's installed, rundspygen --help.Python application: to serve this REST API, rundocker compose up appand openlocalhost:8888in your browser. Within the Dev Container, this is equivalent to runningpoe api.Usage Overviewdspygen [OPTIONS] COMMAND [ARGS]...Global Options--install-completion: Adds shell completion.--show-completion: Displays the shell completion script.--help: Brings up the help message.Core Commandscommand: Adds or creates new subcommands in a Ruby on Rails-inspired CLI structure.help: Accesses a supportive chatbot for quick assistance.init: Initializes a DSPyGen project, setting up a structured environment similar to Ruby on Rails.module: Manages DSPy modules, enabling easy modifications or the creation of new ones.Command DetailsManaging CommandsAdd a Command: Extend functionality seamlessly, reminiscent of Ruby on Rails plugins.dspygencommandadd[existing_command][new_command]New Command Module: Start new functionalities with ease.dspygencommandnew[new_command_name]Modules ManagementNew Module Generation: Create new DSPy modules to extend your project's capabilities.dspygenmodulenew'text -> summary'Project StructureFollowing a clear and organized structure influenced by Ruby on Rails, DSPyGen projects are easy to navigate:.
├── src
│   ├── dspygen
│   │   ├── modules
│   │   └── subcommands
│   └── typetemp
└── testsHelp and DocumentationFor detailed command information or assistance, use:dspygen[command]--helpContributingWe welcome contributions to DSPyGen, whether it's new features, improvements, or bug fixes. Feel free to fork the repository, make changes, and submit a pull request.LicenseDSPyGen is open-source, licensed under the MIT License.Adopting DSPyGen for your AI projects not only simplifies the development process but also incorporates the structured, efficient approach pioneered by Ruby on Rails into the realm of AI and machine learning.ContributingPrerequisites1. Set up Git to use SSHGenerate an SSH keyandadd the SSH key to your GitHub account.Configure SSH to automatically load your SSH keys:cat<< EOF >> ~/.ssh/configHost *AddKeysToAgent yesIgnoreUnknown UseKeychainUseKeychain yesEOF2. Install DockerInstall Docker Desktop.EnableUse Docker Compose V2in Docker Desktop's preferences window.Linux only:Export your user's user id and group id so thatfiles created in the Dev Container are owned by your user:cat<< EOF >> ~/.bashrcexport UID=$(id --user)export GID=$(id --group)EOF3. Install VS Code or PyCharmInstall VS CodeandVS Code's Dev Containers extension. Alternatively, installPyCharm.Optional:install aNerd Fontsuch asFiraCode Nerd Fontandconfigure VS Codeorconfigure PyCharmto use it.Development environmentsThe following development environments are supported:⭐️GitHub Codespaces: click onCodeand selectCreate codespaceto start a Dev Container withGitHub Codespaces.⭐️Dev Container (with container volume): click onOpen in Dev Containersto clone this repository in a container volume and create a Dev Container with VS Code.Dev Container: clone this repository, open it with VS Code, and runCtrl/⌘+⇧+P→Dev Containers: Reopen in Container.PyCharm: clone this repository, open it with PyCharm, andconfigure Docker Compose as a remote interpreterwith thedevservice.Terminal: clone this repository, open it with your terminal, and rundocker compose up --detach devto start a Dev Container in the background, and then rundocker compose exec dev zshto open a shell prompt in the Dev Container.DevelopingRunpoefrom within the development environment to print a list ofPoe the Poettasks available to run on this project.Runpoetry add {package}from within the development environment to install a run time dependency and add it topyproject.tomlandpoetry.lock. Add--group testor--group devto install a CI or development dependency, respectively.Runpoetry updatefrom within the development environment to upgrade all dependencies to the latest versions allowed bypyproject.toml.