Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@hunterjackson
Copy link
Contributor

The FBMessengerHandler handles both Instagram and FBMessenger, to use the handler for instagram set the value instagram_mode=true

here is an example with instagram mode set in the Messenger Handler

port = 8080

[[plugins]]
name = "hf_test"
type = "hugging_face"
endpoint = "https://example.com"
token_limit = 1000
api_key = "<your api_token here>"

[[stores]]
name = "memory_test"
type = "memory"
storage_duration_hours = 1
storage_capacity_mbs = 1

[[handlers]]
type = "messenger"
name = "messenger_test"
instagram_mode = true
verify_token = "<your verification token here>"
app_secret = "<your verification app secret here>"
page_access_token = "<your page access token here>"

[[services]]
webhook_path = "/messenger"
plugin = "openai_test"
store = "memory_test"
handler = "messenger_test"

To dynamically set from the plugin the page and access token fields set the corresponding values in the FBMessage. This is a bit of a hack for the time being so your plugin will need to only support FBMessage as an input, so you can use the constructors in FBMessage to create FBMessage objects. For Instagram make sure that the page id is the corresponding Facebook page.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants