mudler / LocalAI

:robot: The free, Open Source alternative to OpenAI, Claude and others. Self-hosted and local-first. Drop-in replacement for OpenAI, running on consumer-grade hardware. No GPU required. Runs gguf, transformers, diffusers and many more models architectures. Features: Generate Text, Audio, Video, Images, Voice Cloning, Distributed, P2P inference
https://localai.io
MIT License
25.75k stars 1.93k forks source link

slack-qa-bot get 404 #786

Open ZanyuanYang opened 1 year ago

ZanyuanYang commented 1 year ago

LocalAI version:

5ce5f87

Environment, CPU architecture, OS, and Version:

Mac 2.6 GHz 6-Core Intel Core i7

Describe the bug

I follow all the step for slack-qa-bot. And it successfully run, I can get "slack-qa-bot-api-1 | [127.0.0.1]:59620 200 - GET /readyz". But When I ask the question in slack, I get the 404:

slackbot            | [Suggestion] You can handle this type of event with the following listener function:
slackbot            | 
slackbot            | @app.event("message")
slackbot            | def handle_message_events(body, logger):
slackbot            |     logger.info(body)
slackbot            | 
slackbot            | INFO:slack_bolt.App:Unsuccessful Bolt execution result (status: 404, body: {"error": "unhandled request"})

To Reproduce

Expected behavior

Logs

slackbot            | [Suggestion] You can handle this type of event with the following listener function:
slackbot            | 
slackbot            | @app.event("message")
slackbot            | def handle_message_events(body, logger):
slackbot            |     logger.info(body)
slackbot            | 
slackbot            | INFO:slack_bolt.App:Unsuccessful Bolt execution result (status: 404, body: {"error": "unhandled request"})

Additional context

ZanyuanYang commented 1 year ago

I have set SLACK_APP_TOKEN and SLACK_BOT_TOKEN, do we need to set OPENAI_API_KEY?

localai-bot commented 1 year ago

:warning::warning::warning::warning::warning:

Hi! I'm a bot running with LocalAI ( a crazy experiment of @mudler ) - please beware that I might hallucinate sometimes!

_but.... I can also be funny or helpful :smilecat: and I can provide generally speaking good tips or places where to look after in the documentation or in the code based on what you wrote in the issue.

Don't engage in conversation with me, I don't support (yet) replying!

:warning::warning::warning::warning::warning:

I see that you are trying to run a Slack QA bot with LocalAI. It seems like there is an issue with the Bolt execution result. To troubleshoot this, we can try a few things:

  1. Check if the API endpoint for the Slack integration is correctly set up in the slack-qa-bot configuration file.
  2. Ensure that the LocalAI container image and environment variables are properly set up on the RunPod instance.
  3. Check if the Bolt code for the Slack integration is correctly implemented and compatible with the latest version of LocalAI.
  4. Check if there are any errors or issues with the Slack API credentials or authentication. If none of these steps resolve the issue, we can try debugging the code further by adding more logs and checking the Bolt execution result in more detail.

Sources: