-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
callback throws - ["⛔ TypeError: callback is not a function"] - when action is called from the Twitter Client #1544
Comments
Hello @Chunt0! Welcome to the ai16z community. Thank you for opening your first issue; we appreciate your contribution. You are now a ai16z contributor! |
Thanks for sharing - This is due to the handler using the callback without
checking if it is nonnull as the callback param on the handler function is
nullable
…On Sat, Dec 28, 2024 at 12:18 PM Chunt0 ***@***.***> wrote:
*Describe the bug*
When an action is initiated via the Twitter Client this error is thrown
when the response of the action is sent back up the stack using
callback(messageResponse). If the action is called using the Direct Client,
no error occurs and the messageResponse is displayed in the client app.
["⛔ TypeError: callback is not a function"]
*To Reproduce*
This error occurs when a client other than the Direct Client calls an
action that sends a Content object through a HandlerCallback in the handler
of an Action. This occurs when using plugin-image-generation to generating
images as well.
To reproduce using the ImageGenerationPlugin:
Enable the twitter client for your character along with an appropriate API
key for image generation. Reply to a post of the Agent on twitter with
"Please generate an image of a cute cat!" - it should trigger the
GENERATE_IMAGE action. This will cause the TypeError to occur.
*Expected behavior*
I am unsure what the expected behavior should be. I would expect the
callback to be able to take the Content object and pass it back to the
client from which the action was initiated from and some content text to be
returned to the conversation that initiated the action.
—
Reply to this email directly, view it on GitHub
<#1544>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADS6ROO24ZIK4DFWIVA2XVT2H4BRTAVCNFSM6AAAAABUKC6Q5CVHI2DSMVQWIX3LMV43ASLTON2WKOZSG43DCOJRGAYDONI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I have the same problem when using "@ai16z/client-twitter": "v0.1.4-alpha.3", |
@Chunt0 may I ask are you pulling the latest code? I believe it's added few weeks ago 🤔 https://github.com/elizaOS/eliza/pull/1040/files#r1884157671 |
What is the version of ElizaOS you running ? This is old stuff already resolved I think. |
Describe the bug
When an action is initiated via the Twitter Client this error is thrown when the response of the action is sent back up the stack using callback(messageResponse). If the action is called using the Direct Client, no error occurs and the messageResponse is displayed in the client app.
["⛔ TypeError: callback is not a function"]
To Reproduce
This error occurs when a client other than the Direct Client calls an action that sends a Content object through a HandlerCallback in the handler of an Action. This occurs when using plugin-image-generation to generating images as well.
To reproduce using the ImageGenerationPlugin:
Enable the twitter client for your character along with an appropriate API key for image generation. Reply to a post of the Agent on twitter with "Please generate an image of a cute cat!" - it should trigger the GENERATE_IMAGE action. This will cause the TypeError to occur.
Expected behavior
I am unsure what the expected behavior should be. I would expect the callback to be able to take the Content object and pass it back to the client from which the action was initiated from and some content text to be returned to the conversation that initiated the action.
The text was updated successfully, but these errors were encountered: