The examples below use AWS. Azure support is coming soon with a similar API.
Basic usage
judge method:
- Sends the claim and sources to Gateway
- Waits for completion (polls automatically)
- Returns a
Rulingobject with the verdict and evidence
Authentication (AWS)
TheAwsClient uses your AWS credentials to invoke the Step Function. Credentials are loaded automatically from:
- Environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY) - IAM role (when running on AWS)
- AWS credentials file (
~/.aws/credentials)
Sources
Currently, only text sources are supported:Types
All types are importable fromgateway:
| Type | Description |
|---|---|
TextSource | A plain-text source document |
Ruling | The result of client.judge() |
Statement | A single statement extracted from the claim |
Influence | Evidence from a source that influenced a verdict |
TextInfluence | Evidence from a TextSource, includes character spans |
Verdict | Enum: SUPPORTS, REFUTES, NOT_ENOUGH_INFO |
Errors
Errors are raised fromgateway.errors:

