Usage

To help minimize latency Pongo offers deployments in both Oregon (US-WEST-2) and N.Virginia (US-EAST-1)

By default the Pongo API uses US-WEST-2, you can change the region parameter to select the region you want

If you need a deployment in another region, please contact us.

import pongo

#Replace the key with your actual API key
pongo_client = pongo.PongoClient(PONGO_SECRET_KEY)

query = "What color are apples?"

results_to_filter = [
            "Oranges are orange",
            "Apples can be red or green",
            "Grapes can be purple or green",
            "Banannas are yellow"
        ]

#Passsing in an invalid region will fall back to US-WEST-2
pongo_result = pongo_client.filter(
    docs=results_to_filter,
    query=query,
    region='us-east-1'
)

#List of the 10 most relevant documents to the query
filtered_docs = pongo_result.json()