We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ea9165 commit f5db6caCopy full SHA for f5db6ca
parea/cookbook/tracing_with_images_anthropic.py
@@ -28,14 +28,17 @@ def image_maker(query: str) -> str:
28
return image_url
29
30
31
-import requests
32
-import base64
33
from typing import Optional
34
+import base64
+
35
+import requests
36
37
38
@trace
39
def ask_vision(image_url: str) -> Optional[str]:
40
image_data = requests.get(image_url).content
- base64_image = base64.b64encode(image_data).decode('utf-8')
41
+ base64_image = base64.b64encode(image_data).decode("utf-8")
42
43
response = a_client.messages.create(
44
model="claude-3-haiku-20240307",
0 commit comments