Spaces:
Running
Running
Download app/modules/posts/domain/sync.py from AlleksDev/frimeet-api-nlp: direct link, hf CLI and curl.
- Browser
- Download file 899 Bytes
-
https://huggingface.co/spaces/AlleksDev/frimeet-api-nlp/resolve/main/app/modules/posts/domain/sync.py
- Command line
-
hf download hf://spaces/AlleksDev/frimeet-api-nlp/app/modules/posts/domain/sync.py
-
curl -L -o sync.py https://huggingface.co/spaces/AlleksDev/frimeet-api-nlp/resolve/main/app/modules/posts/domain/sync.py
899 Bytes
| from dataclasses import dataclass, field | |
| from datetime import datetime | |
| from typing import Any | |
| class PostSourceRecord: | |
| id: str | |
| document: str | |
| metadata: dict[str, Any] | |
| content_hash: str | |
| is_active: bool | |
| author_type: str | None = None | |
| author_id: str | None = None | |
| published_at: datetime | None = None | |
| source_version: int | None = None | |
| class PostChangeRecord: | |
| event_id: int | |
| post_id: str | |
| operation: str | |
| source_version: int | |
| post: PostSourceRecord | None = None | |
| class PostEmbeddingRecord: | |
| source: PostSourceRecord | |
| embedding: list[float] | |
| versioned_hash: str | |
| class PostSyncResult: | |
| processed: int = 0 | |
| skipped: int = 0 | |
| upserted: int = 0 | |
| deactivated: int = 0 | |
| last_event_id: int = 0 | |
| errors: list[str] = field(default_factory=list) | |