AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

feature: optional requirements

Open Tymec opened this issue 1 year ago • 2 comments

Background

Adds a feature to install optional dependencies based on the config options. For example, the memory backend config option can have different values that correspond to different optional packages, such as redis, pinecone-client, weaviate-client or pymilvus. Instead of installing all these packages, which may not be compatible with some operating systems or environments and wouldn't be used, this feature allows the user to install only the package that matches their config value. This can save time and space, and avoid installation errors. The feature uses a script that parses a file called requirements-optional.txt, which specifies the optional packages and their config options, and then uses subprocess to run pip install commands for the required packages.

Changes

  • Added a script to parse the requirements-optional.txt file and install dependencies based on used config options
  • Added a file requirements-optional.txt to specify the optional packages and their corresponding config options
  • Added an empty file scripts/init.py

Documentation

  • In-code comments that explain the logic and functionality of the code.

Test Plan

PR Quality Checklist

  • [x] My pull request is atomic and focuses on a single change.
  • [x] I have thoroughly tested my changes with multiple different prompts.
  • [x] I have considered potential risks and mitigations for my changes.
  • [x] I have documented my changes clearly and comprehensively.
  • [x] I have not snuck in any "extra" small tweaks changes

Tymec avatar Apr 19 '23 11:04 Tymec

This is a mass message from the AutoGPT core team. Our apologies for the ongoing delay in processing PRs. This is because we are re-architecting the AutoGPT core!

For more details (and for infor on joining our Discord), please refer to: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting

p-i- avatar May 05 '23 00:05 p-i-

Note that the same issue seems to have been solved recently as part of supporting plugins, so these two efforts may benefit from each other - especially since more and more optional functionality is likely to end up in plugins, and since you are talking about "optional requirements", there's probably a real use-case for the API at the plugin layer, so that plugins may also support different options.

Boostrix avatar May 05 '23 16:05 Boostrix

@Tymec can you consolidate this in as @Boostrix described

ntindle avatar Jun 07 '23 04:06 ntindle

Deployment failed with the following error:

Resource is limited - try again in 9 hours (more than 100, code: "api-deployments-free-per-day").

vercel[bot] avatar Jun 07 '23 04:06 vercel[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Jun 7, 2023 6:08pm

vercel[bot] avatar Jun 07 '23 18:06 vercel[bot]

Codecov Report

Patch and project coverage have no change.

Comparison is base (1e851ba) 69.67% compared to head (dcdf031) 69.67%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2524   +/-   ##
=======================================
  Coverage   69.67%   69.67%           
=======================================
  Files          72       72           
  Lines        3558     3558           
  Branches      569      569           
=======================================
  Hits         2479     2479           
  Misses        890      890           
  Partials      189      189           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jun 07 '23 18:06 codecov[bot]

Since there has been no activity on this PR by OP for the past 2.5+ months, I'm closing it as stale. Feel free to bump, reply or ping me on Discord if you want to discuss further or pick it back up. :)

Pwuts avatar Jul 07 '23 17:07 Pwuts