Use this file to discover all available pages before exploring further.
What this builds. A KB that indexes one or more first-class Table SDK objects (already-stored Table resources on your account).
You’ll end up with. A KB whose list_items surface includes the indexed tables as kind=TABLE items, queryable alongside text items.
"""Example 05: Index VectorShift Table objects into a KB.`kb.add_tables(...)` accepts first-class VectorShift `Table` SDKobjects (already-stored Table resources, e.g. from a scrape-table flow).CSV/XLSX/TSV file uploads go through `kb.add_files(...)` instead."""from vectorshift import Tablefrom vectorshift.knowledge_base import KnowledgeBase# In a real flow: fetch existing Table resources you want indexed.# Replace the IDs with real Tables from your account.table_ids = ["69f4b3e3b12ccdbaff50b0c9"]tables = []for tid in table_ids: if tid.startswith("YOUR_"): print("Replace YOUR_TABLE_ID_* with real Table ids to run this example.") raise SystemExit(0) tables.append(Table.fetch(id=tid))kb = KnowledgeBase.new(name="SDK tables demo")print(f"1. Created KB id={kb.id}")task = kb.add_tables_and_wait(tables, timeout=180)print(f"2. Indexed {len(tables)} tables: status={task.status}")# Tables surface as KBItems with kind=TABLEitems = kb.list_items(limit=20)print(f"3. Items: {[(i.name, i.kind) for i in items[:6]]}")# kb.delete()# print("4. Deleted KB.")