Skip to content

Commit

Permalink
fixing blocked image
Browse files Browse the repository at this point in the history
  • Loading branch information
jmansdorfer committed Nov 8, 2024
1 parent bb4b46f commit 7cecf6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions fern/docs/pages/reference/chat_vision.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ images that are base64 encoded represented by a data uri.
{
"type": "image_url",
"image_url": {
"url": "https://pbs.twimg.com/media/GKLN4qPXEAArqoK.png",
"url": "https://farm4.staticflickr.com/3300/3497460990_11dfb95dd1_z.jpg",
}
}
]
Expand Down Expand Up @@ -97,7 +97,7 @@ images that are base64 encoded represented by a data uri.
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()

image, err := client.NewImageNetwork("https://pbs.twimg.com/media/GKLN4qPXEAArqoK.png")
image, err := client.NewImageNetwork("https://farm4.staticflickr.com/3300/3497460990_11dfb95dd1_z.jpg")
if err != nil {
return fmt.Errorf("ERROR: %w", err)
}
Expand Down Expand Up @@ -167,7 +167,7 @@ images that are base64 encoded represented by a data uri.
const client = new pg.Client('https://api.predictionguard.com', process.env.PREDICTIONGUARD_API_KEY);

async function ChatVision() {
const image = new pg.ImageNetwork('https://pbs.twimg.com/media/GKLN4qPXEAArqoK.png');
const image = new pg.ImageNetwork('https://farm4.staticflickr.com/3300/3497460990_11dfb95dd1_z.jpg');

const input = {
role: pg.Roles.User,
Expand All @@ -194,7 +194,7 @@ images that are base64 encoded represented by a data uri.
<CodeBlock title="cURL">
```bash
curl -O 'https://pbs.twimg.com/media/GKLN4qPXEAArqoK.png'
curl -O 'https://farm4.staticflickr.com/3300/3497460990_11dfb95dd1_z.jpg'

base64_img="$(base64 -i GKLN4qPXEAArqoK.png)"

Expand Down
6 changes: 3 additions & 3 deletions fern/docs/pages/usingllms/chat_vision.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ messages = [
{
"type": "image_url",
"image_url": {
"url": "https://pbs.twimg.com/media/GKLN4qPXEAArqoK.png",
"url": "https://farm4.staticflickr.com/3300/3497460990_11dfb95dd1_z.jpg",
}
}
]
Expand Down Expand Up @@ -68,7 +68,7 @@ messages = [
{
"type": "image_url",
"image_url": {
"url": "GKLN4qPXEAArqoK.png",
"url": "3497460990_11dfb95dd1_z.jpg",
}
}
]
Expand Down Expand Up @@ -104,7 +104,7 @@ def encode_image_to_base64(image_path):
base64_message = base64_encoded_data.decode('utf-8')
return base64_message

image_path = 'GKLN4qPXEAArqoK.png'
image_path = '3497460990_11dfb95dd1_z.jpg'
encoded_image = encode_image_to_base64(image_path)

```
Expand Down

0 comments on commit 7cecf6c

Please sign in to comment.