simodocs

Examples

Examples

Complete, copyable programs for common jobs. Each shows the Python SDK and the raw HTTP request, so you can use them from any language.

The pattern behind all of them

  1. Put the situation, and any rules, in the state.
  2. Ask every question you need in one request.
  3. Act on the probabilities: automatic above a threshold, a person in between.
Python
r = c.ask({"policy": POLICY, "input": text}, questions)
if min(r.certainty.values()) > 0.9:
    act(r.values)
else:
    review(r)