RAHB-REALTORS-Association / chat2gpt

Chat²GPT is a ChatGPT (and DALL·E 2/3, and ElevenLabs) chat bot for Google Chat. 🤖💬
https://chat2gpt.oncornerstone.app
MIT License
11 stars 1 forks source link

[Feature Request] Add /help command to print docs/usage.md #60

Closed sweep-ai[bot] closed 1 year ago

sweep-ai[bot] commented 1 year ago

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 the docs/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

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:

git checkout sweep/add-help-command

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.

sweep-ai[bot] commented 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.

justinh-rahb commented 1 year ago

You had the snippets in #58 all you had to do was put them in the right place 🤦‍♂️