Skip to main content

agrag.common.data_models.document.TurnRef

Bases: BaseModel

One speaker turn in a chat document.

Attributes:

  • role (str) – The speaker of the turn, for example "user".
  • turn_id (str | None) – The id of the message in the source, when it has one.
  • char_start (int) – The start character offset of the turn in the document text.
  • char_end (int) – The end character offset of the turn, exclusive.

char_end​

char_end: int

char_start​

char_start: int

role​

role: str = Field(min_length=1)

turn_id​

turn_id: str | None = None