Skip to content

legal

Models for legal documents.

LegalDocument pydantic-model

Bases: LegalDocumentShort

Response model for terms and conditions, privacy policies, and licences.

Fields:

content pydantic-field

The content of the document.

LegalDocumentIdentifier pydantic-model

Bases: BaseModel

A model to uniquely identify a legal document.

Fields:

  • category (Literal['terms-and-conditions', 'privacy-policy', 'licence', 'site-agreement'])
  • type (Literal['standard', 'non-commercial', 'commercial'])
  • version (PositiveInt)

category pydantic-field

The category of the document. The site agreement is what an organisation's owner accepts before it may run analyses or keep recordings on its own hardware.

type pydantic-field

The type of the document within its category: 'standard' for terms, privacy and site documents, 'non-commercial' or 'commercial' for licences.

version pydantic-field

The version of the document as a posive integer.

LegalDocumentShort pydantic-model

Bases: LegalDocumentIdentifier

Response model for legal documents.

Does not contain the content itself. See LegalDocument for the full response.

Fields:

  • category (Literal['terms-and-conditions', 'privacy-policy', 'licence', 'site-agreement'])
  • type (Literal['standard', 'non-commercial', 'commercial'])
  • version (PositiveInt)
  • name (str)
  • valid_from (datetime)
  • valid_until (datetime | None)
  • summary (str | None)

name pydantic-field

The name of the document.

summary = None pydantic-field

An optional short summary of the document.

valid_from pydantic-field

The date from which the document is valid.

valid_until pydantic-field

If null, the document is valid indefinitely.

Licence pydantic-model

Bases: LegalDocumentIdentifier

Licence information for an analysis.

Similar to LegalDocumentIdentifier but with type fixed to 'licence' and version defaulting to 'latest' version.

Fields:

  • category (Literal['licence'])
  • type (Literal['non-commercial', 'commercial'])
  • version (PositiveInt | Literal['latest'])

category = 'licence' pydantic-field

The type is always 'licence'.

type pydantic-field

The licence class the analysis is offered under.

version = 'latest' pydantic-field

The version of the licence. An integer or 'latest'.