Making Predictions in Slack

Building intelligent apps with your team.

Function provides a Slack bot that allows you to make predictions right as you discuss and collaborate with your teams.

Installing Function Bot

Install Function in your Slack workspace using the following link:

Make predictions in any conversation with the `/predict` slash command.

Doing so will ask you to authorize Function to join your server:

Installing Function in a Slack workspace

Logging in to Function

Head over to your fxn.ai page on Function to generate a new access key for Slack:

generate access key

We strongly recommend creating a separate access key to login on Slack, instead of reusing an existing access key.

Next, head over to Slack and login with the /fxn slash command:

# Send this message in any Slack channel
/fxn

You should see a login form pop up. Paste the access key you just generated and login:

Logging in to Function on Slack

Making Predictions

First, we'll need a predictor to make predictions with. You can either use a public predictor on Function, or make your own. In this guide, we'll be using the @samples/stable-diffusion predictor:

You can discover and use public predictors on Function.

We'll be using the Stable Diffusion predictor in this guide.

The predictor accepts a prompt which will be used to generate the image. In a channel, type and send the following message:

# Make a prediction in any Slack channel
/predict @samples/stable-diffusion

You should see a form for specifying the inputs for the prediction. Fill in a prompt and make the prediction!

making a prediction

Our Slack bot currently does not support uploading files. Instead, provide a URL to the file instead.

Previous
Predict in Unity