Spaces:
Sleeping
Sleeping
Download models/issue_chat.py from CosmicMagnetar/OpenTriage_AI: direct link, hf CLI and curl.
- Browser
- Download file 655 Bytes
-
https://huggingface.co/spaces/CosmicMagnetar/OpenTriage_AI/resolve/main/models/issue_chat.py
- Command line
-
hf download hf://spaces/CosmicMagnetar/OpenTriage_AI/models/issue_chat.py
-
curl -L -o issue_chat.py https://huggingface.co/spaces/CosmicMagnetar/OpenTriage_AI/resolve/main/models/issue_chat.py
655 Bytes
| from pydantic import BaseModel, Field, ConfigDict | |
| from typing import List | |
| from datetime import datetime, timezone | |
| import uuid | |
| class IssueChat(BaseModel): | |
| """Model for tracking chat conversations on GitHub issues.""" | |
| model_config = ConfigDict(extra="ignore") | |
| id: str = Field(default_factory=lambda: str(uuid.uuid4())) | |
| issueId: str | |
| userId: str | |
| sessionId: str | |
| messages: List[dict] = [] # Array of {role, content, timestamp, githubCommentId, githubCommentUrl} | |
| createdAt: datetime = Field(default_factory=lambda: datetime.now(timezone.utc)) | |
| updatedAt: datetime = Field(default_factory=lambda: datetime.now(timezone.utc)) | |