Skip to content

Commit

Permalink
update image sample data in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shaper committed Feb 1, 2025
1 parent 6a9a9a2 commit 0d1b514
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions content/providers/01-ai-sdk-providers/70-perplexity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ console.log(result.experimental_providerMetadata);
// ],
// usage: { citationTokens: 5286, numSearchQueries: 1 },
// images: [
// { url: "https://example.com/image1.jpg" },
// { url: "https://example.com/image2.jpg" }
// { imageUrl: "https://example.com/image1.jpg", originUrl: "https://elsewhere.com/page1", height: 1280, width: 720 },
// { imageUrl: "https://example.com/image2.jpg", originUrl: "https://elsewhere.com/page2", height: 1280, width: 720 }
// ]
// },
// }
Expand Down
44 changes: 22 additions & 22 deletions packages/perplexity/src/perplexity-metadata-extractor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ describe('buildMetadataFromResponse', () => {
citations: ['source1', 'source2'],
images: [
{
image_url: 'https://image.com',
origin_url: 'https://origin.url',
image_url: 'https://images.com/image1.jpg',
origin_url: 'https://elsewhere.com/page1',
height: 100,
width: 100,
},
Expand All @@ -27,8 +27,8 @@ describe('buildMetadataFromResponse', () => {
citations: ['source1', 'source2'],
images: [
{
imageUrl: 'https://image.com',
originUrl: 'https://origin.url',
imageUrl: 'https://images.com/image1.jpg',
originUrl: 'https://elsewhere.com/page1',
height: 100,
width: 100,
},
Expand Down Expand Up @@ -61,8 +61,8 @@ describe('buildMetadataFromResponse', () => {
const response = {
images: [
{
image_url: 'https://image.com',
origin_url: 'https://origin.url',
image_url: 'https://images.com/image1.jpg',
origin_url: 'https://elsewhere.com/page1',
height: 100,
width: 100,
},
Expand All @@ -77,8 +77,8 @@ describe('buildMetadataFromResponse', () => {
perplexity: {
images: [
{
imageUrl: 'https://image.com',
originUrl: 'https://origin.url',
imageUrl: 'https://images.com/image1.jpg',
originUrl: 'https://elsewhere.com/page1',
height: 100,
width: 100,
},
Expand Down Expand Up @@ -148,8 +148,8 @@ describe('streaming metadata extractor', () => {
choices: [{ delta: { role: 'assistant', content: 'content' } }],
images: [
{
image_url: 'https://image.com',
origin_url: 'https://origin.url',
image_url: 'https://images.com/image1.jpg',
origin_url: 'https://elsewhere.com/page1',
height: 100,
width: 100,
},
Expand All @@ -172,8 +172,8 @@ describe('streaming metadata extractor', () => {
citations: ['source1', 'source2'],
images: [
{
imageUrl: 'https://image.com',
originUrl: 'https://origin.url',
imageUrl: 'https://images.com/image1.jpg',
originUrl: 'https://elsewhere.com/page1',
height: 100,
width: 100,
},
Expand All @@ -194,8 +194,8 @@ describe('streaming metadata extractor', () => {
citations: ['source1'],
images: [
{
image_url: 'https://image-1.com',
origin_url: 'https://origin-1.url',
image_url: 'https://images.com/image1.jpg',
origin_url: 'https://elsewhere.com/page1',
height: 100,
width: 100,
},
Expand All @@ -211,14 +211,14 @@ describe('streaming metadata extractor', () => {
citations: ['source1', 'source2'],
images: [
{
image_url: 'https://image-1.com',
origin_url: 'https://origin-1.url',
image_url: 'https://images.com/image1.jpg',
origin_url: 'https://elsewhere.com/page1',
height: 100,
width: 100,
},
{
image_url: 'https://image-2.com',
origin_url: 'https://origin-2.url',
image_url: 'https://images.com/image2.jpg',
origin_url: 'https://elsewhere.com/page2',
height: 200,
width: 200,
},
Expand All @@ -236,14 +236,14 @@ describe('streaming metadata extractor', () => {
citations: ['source1', 'source2'],
images: [
{
imageUrl: 'https://image-1.com',
originUrl: 'https://origin-1.url',
imageUrl: 'https://images.com/image1.jpg',
originUrl: 'https://elsewhere.com/page1',
height: 100,
width: 100,
},
{
imageUrl: 'https://image-2.com',
originUrl: 'https://origin-2.url',
imageUrl: 'https://images.com/image2.jpg',
originUrl: 'https://elsewhere.com/page2',
height: 200,
width: 200,
},
Expand Down

0 comments on commit 0d1b514

Please sign in to comment.