🔑 Getting Started
The Vectify SDK allows you to easily integrate Vectify AI's managed retrieval services in your Python applications.
Install
pip install vectifyai
Initiate a Client
To utilize the Vectify SDK, start by importing and setting up the client:
import vectifyai
client = vectifyai.Client(api_key='YOUR_API_KEY')
Note: Replace 'YOUR_API_KEY' with your actual Vectify API key.
Add a Data Source
To add a new data source:
client.add_source(source_name='City')
Add a File
To add a file to a specific data source:
client.add_file(source_name='City', local_path='/Users/John/Boston.txt')
Retrieval
To retrieve the most relevant knowledge passages for a given query from a data source:
results = client.retrieve(query='Where is Boston?', top_k=5, sources=['City'])