Closed sweep-ai[bot] closed 1 year ago
GitHub actions yielded the following error.
The command that failed is flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
. Here are the relevant lines from the logs:
./main.py:316:6: E999 SyntaxError: expected 'except' or 'finally' block
elif user_message.strip().lower().startswith('/tts'):
^
1 E999 SyntaxError: expected 'except' or 'finally' block
1
##[error]Process completed with exit code 1.
This is likely a linting or type-checking issue with the source code. Update the code the changes and avoid modifying the existing tests.
I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.
You had the snippets in #58 all you had to do was put them in the right place 🤦♂️
Description
This PR adds a new
/help
command to the chatbot's message handling logic. When users invoke the/help
command, the bot will read thedocs/usage.md
file, extract the content below the---
header, and return it as its response. This provides users with immediate access to helpful information on how to interact with the chatbot without having to refer to external documentation.Changes Made
elif
condition in thehandle_message
function to check if the user input starts with/help
.docs/usage.md
file and extracted the relevant content below the---
header.Benefits
Additional Context
The proposed solution assumes that the
docs/usage.md
file exists and is structured with a---
header. If the file structure changes in the future, the implementation may require adjustments.Fixes #58.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.