Run Example

This document provides instructions for running the Smart Search SDK example script (simple.py).


How to Run

  1. Clone the Smart Search SDK repository:

git clone https://github.com/GDP-ADMIN/smart-search-sdk.git
  1. Navigate to the examples directory:

cd python/examples
  1. Run the script:

make run

Expected Results

When you run the script, you'll see an interactive menu with the following options:

Options:
1. Get authentication emails
2. Search
3. Sonar Deep Research (POST)
4. Sonar Deep Research (WebSocket)
5. assafelovic Deep Research (POST)
6. assafelovic Deep Research (WebSocket)
7. Exit

Example Usage

  1. Get Authentication Emails (Option 1)

    • Enter page number (default: 1)

    • Enter items per page (default: 10)

    • The script will display authentication emails in JSON format

  2. Search (Option 2)

    • Enter search_profile_names (default: 'general')

    • Enter search query (default: 'Time Tracking Report for monitoring presence records')

    • Enter items per page (default: 10)

    • Enter additional parameters (optional)

    • The script will display search results in JSON format

  3. Deep Research Options (4-6)

    • Enter search query

    • The script will perform deep research and display results

    • WebSocket options will show real-time updates


Notes

  • The script requires valid credentials in the .env file

  • All responses are formatted in JSON for easy reading

  • Error handling is implemented for invalid inputs and API errors


Troubleshooting

If you encounter any issues:

  1. Verify your .env file configuration

  2. Check your network connection to the Smart Search API

  3. Verify your authentication token is valid

For more detailed information about the SDK's capabilities, refer to the main documentation.

Last updated