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

callback throws - ["⛔ TypeError: callback is not a function"] - when action is called from the Twitter Client #1544

Closed
Chunt0 opened this issue Dec 28, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Chunt0
Copy link

Chunt0 commented Dec 28, 2024

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.

@Chunt0 Chunt0 added the bug Something isn't working label Dec 28, 2024
Copy link

Hello @Chunt0! Welcome to the ai16z community. Thank you for opening your first issue; we appreciate your contribution. You are now a ai16z contributor!

@monilpat
Copy link
Collaborator

monilpat commented Dec 28, 2024 via email

@renzo4web
Copy link

I have the same problem when using "@ai16z/client-twitter": "v0.1.4-alpha.3",

@tcm390
Copy link
Collaborator

tcm390 commented Dec 31, 2024

@Chunt0 may I ask are you pulling the latest code? I believe it's added few weeks ago 🤔

#1040

https://github.com/elizaOS/eliza/pull/1040/files#r1884157671

@AIFlowML
Copy link
Contributor

AIFlowML commented Jan 2, 2025

What is the version of ElizaOS you running ? This is old stuff already resolved I think.

@Chunt0 Chunt0 closed this as completed Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants