1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "action": "full_workflow",
10 "documents": [
11 {
12 "content": "Machine learning is a type of AI that learns patterns from data to make predictions.",
13 "metadata": { "category": "AI" },
14 },
15 {
16 "content": "PostgreSQL is a powerful open-source relational database.",
17 "metadata": { "category": "Database" },
18 },
19 {
20 "content": "Neural networks are inspired by the human brain and consist of layers of nodes.",
21 "metadata": { "category": "AI" },
22 },
23 {
24 "content": "Vector databases store data as mathematical embeddings for similarity search.",
25 "metadata": { "category": "Database" },
26 },
27 ],
28}
29
30
31run = client.actor("ruv/self-learning-postgres-db").call(run_input=run_input)
32
33
34print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
35for item in client.dataset(run["defaultDatasetId"]).iterate_items():
36 print(item)
37
38