schema = {
"type": "object",
"properties": {
"stories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {"type": "string"},
"points": {"type": "integer"},
"author": {"type": "string"},
},
},
},
},
}
data = app.extract(
urls=["https://news.ycombinator.com"],
params={
"prompt": "Top 5 stories with points and author.",
"schema": schema,
},
)
print(data)