Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropyacht: dynamic source page #23

Draft
wants to merge 2 commits into
base: multiservice_endpoints
Choose a base branch
from

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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants