Hi there! Was playing around with smol-dev (thinking of integrating with Continue soon : )) and came across a few bumps when setting up, so figured I might just share the changes I made for myself. Open to leaving out anything that you think doesn't belong, but here's what I edited:
[ ] Add dependency for python-dotenv and use to load OPENAI_API_KEY env variable. Then in prompts.py added call to load_dotenv and set openai.api_key explicitly
[ ] README: Replace python with python3, because there is a dependency on python3 anyway so being specific can't hurt. In my case on Mac, python3 works but python does not.
[ ] README: Add step to activate the virtual environment with poetry shell (otherwise following the exact steps listed in "In Git Repo Mode" doesn't work)
[ ] README: Add note to update .example.env and move to .env
[ ] README: Add note about debugging in VS Code
[ ] VS Code debugging pre-configuration: launch.json specifies how to debug main.py, and is setup to automatically make sure poetry install has been run prior (via tasks.json). And settings.json sets the default python interpreter to be the one from poetry.
[ ] Added python requirement for >=3.9, <4.0 because otherwise errors are thrown when using poetry add due to requirements of other depended upon packages (see error msg below)
*It's notable that I removed .vscode from the .gitignore, which means that someone with a prior settings.json mighta accidentally commit that if they don't notice, but there would first be merge conflicts to warn them and this file isn't meant to be secret, so should be okay.
If this is a lot for one PR let me know, happy to leave things out or split them up!
Error when trying poetry add prior to changing the python requirement
The current project's Python requirement (>=3.8) is not compatible with some of the required packages Python requirement:
- agent-protocol requires Python >=3.7,<4.0.0, so it will not be satisfied for Python >=4.0.0
- agent-protocol requires Python >=3.7,<4.0.0, so it will not be satisfied for Python >=4.0.0
Because no versions of agent-protocol match >0.2.3,<0.2.4 || >0.2.4,<0.3.0
and agent-protocol (0.2.4) requires Python >=3.7,<4.0.0, agent-protocol is forbidden.
So, because agent-protocol (0.2.3) requires Python >=3.7,<4.0.0
and smol-dev depends on agent-protocol (^0.2.3), version solving failed.
• Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
For agent-protocol, a possible solution would be to set the `python` property to ">=3.8,<4.0.0"
For agent-protocol, a possible solution would be to set the `python` property to ">=3.8,<4.0.0"
Hi there! Was playing around with smol-dev (thinking of integrating with Continue soon : )) and came across a few bumps when setting up, so figured I might just share the changes I made for myself. Open to leaving out anything that you think doesn't belong, but here's what I edited:
OPENAI_API_KEY
env variable. Then inprompts.py
added call toload_dotenv
and setopenai.api_key
explicitlypython
withpython3
, because there is a dependency onpython3
anyway so being specific can't hurt. In my case on Mac,python3
works butpython
does not.poetry shell
(otherwise following the exact steps listed in "In Git Repo Mode" doesn't work).example.env
and move to.env
main.py
, and is setup to automatically make surepoetry install
has been run prior (via tasks.json). Andsettings.json
sets the default python interpreter to be the one from poetry.poetry add
due to requirements of other depended upon packages (see error msg below)*It's notable that I removed
.vscode
from the.gitignore
, which means that someone with a prior settings.json mighta accidentally commit that if they don't notice, but there would first be merge conflicts to warn them and this file isn't meant to be secret, so should be okay.If this is a lot for one PR let me know, happy to leave things out or split them up!
Error when trying
poetry add
prior to changing the python requirement