check if query predicate is added

Signed-off-by: Andrey Rybalchenko <rybal@microsoft.com>
implement get_model

Signed-off-by: Andrey Rybalchenko <rybal@microsoft.com>