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

fix: 1668 fix twitter image link #1671

Merged
merged 4 commits into from
Jan 2, 2025

Conversation

nusk0
Copy link
Contributor

@nusk0 nusk0 commented Jan 2, 2025

Fix issue where an agent on twitter tries to use ImageDescriptionService to get the description of a picture from a twitter post but the link provided by the twitter client is a normal twitter link instead of a .pbs link (see example below)
Link to post : https://x.com/MelissiaHanse12/status/1874616542509621650
Link to media : https://pbs.twimg.com/media/GgP5z7AaYAAVN8e?format=jpg&name=small
When provided with the post link, Model returns an error [see original issue] (#1668)

Relates to:

Issue 1668

Risks

Low

Background

What does this PR do?

What kind of change is this?

Documentation changes needed?

Testing

I cloned a fresh repo from the release 1.7 and ran a default character with twitter client. My .env contained an Openai API key and I used a venice API model for my agent. I implemented the fix from this PR first PR 1667
After that, I added a printline to the requestOpenAI function inside of packages\plugin-node\src\services\image.ts at line 221 and 222. (file is not included in PR since it is not needed for the fix).

const responseText = await response.text();
//Line to verify if API is giving back an image description
elizaLogger.log("OpenAI Response Status:", response.status);
elizaLogger.log("OpenAI Raw Response:", responseText);

Where should a reviewer start?

Detailed testing steps

Discord username

displayed name : nusko Discord nametag : nusko_

@shakkernerd shakkernerd changed the base branch from main to develop January 2, 2025 02:12
@monilpat monilpat changed the title 1668 fix twitter image link fix: 1668 fix twitter image link Jan 2, 2025
Copy link
Collaborator

@monilpat monilpat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants