AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Add environment variable WORKSPACE_PATH

Open holisHsu opened this issue 2 years ago • 4 comments

Background

I see the TODO when browsing code

# TODO: have this directory live outside the repository (e.g. in a user's
#   home directory) and have it come in as a command line argument or part of
#   the env file.

But it seems have competed 🤔

So I run it with command line argument, seems work

CleanShot 2023-04-30 at 13 39 22@2x

CleanShot 2023-04-30 at 13 40 10@2x

And then I saw workspace_path still can not set by ENV variable, so perhaps we can give it one.

I am still not sure the format of AI setting YAML file, so I not touch this part.

Changes

  1. Add environment variable WORKSPACE_PATH to set workspace_path
  2. Remove maybe redundant TODO

Documentation

Test Plan

  1. I have test locally about command line argument and .env file setting. Both success.
  2. Command line argument might have higher priority than environment variable.
  3. Test in other OS might be needed

PR Quality Checklist

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

holisHsu avatar Apr 30 '23 08:04 holisHsu

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

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2023 8:39am

vercel[bot] avatar Apr 30 '23 08:04 vercel[bot]

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-

this looks like a straightforward and simple change that might be a potential candidate PR to be reviewed prior to/during the ongoing re-arch effort.

Boostrix avatar May 05 '23 09:05 Boostrix

Agree, this seems like a useful feature that shouldn't harm the re-arch too much.

anonhostpi avatar May 05 '23 18:05 anonhostpi

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar May 25 '23 18:05 github-actions[bot]

Thank you for submitting your contribution. However, it appears to be a duplicate of #1315. I will close this submission for now and recommend that you collaborate with that author if you are still interested in merging this PR.

lc0rp avatar Jul 01 '23 04:07 lc0rp

Thank you for submitting your contribution. However, it appears to be a duplicate of #1315. I will close this submission for now and recommend that you collaborate with that author if you are still interested in merging this PR.

Many thanks for you help, and I am so sorry for my no timely response.

holisHsu avatar Apr 24 '24 06:04 holisHsu