Skip to content

fix: 1668 fix twitter image link#1671

Merged
mcp97 merged 4 commits into
elizaOS:developfrom
nusk0:1668--fix_TwitterImageLink
Jan 2, 2025
Merged

fix: 1668 fix twitter image link#1671
mcp97 merged 4 commits into
elizaOS:developfrom
nusk0:1668--fix_TwitterImageLink

Conversation

@nusk0

@nusk0 nusk0 commented Jan 2, 2025

Copy link
Copy Markdown
Contributor

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
@mcp97 mcp97 changed the title 1668 fix twitter image link fix: 1668 fix twitter image link Jan 2, 2025

@mcp97 mcp97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@mcp97 mcp97 merged commit 333e2d9 into elizaOS:develop Jan 2, 2025
1to3for5vi7ate9x pushed a commit to 1to3for5vi7ate9x/eliza that referenced this pull request Jan 26, 2025
lalalune pushed a commit that referenced this pull request May 3, 2026
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