Skip to content

Commit 011e843

Browse files
committed
before tests and question
1 parent 2d86dcb commit 011e843

12 files changed

+2
-23
lines changed

backend/apps/ai/common/base/ai_command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ class BaseAICommand(BaseCommand):
1313
"""Base class for AI management commands with common functionality."""
1414

1515
model_class: type[Model]
16-
entity_name: str
17-
entity_name_plural: str
1816
key_field_name: str
1917

2018
def __init__(self, *args, **kwargs):
2119
"""Initialize the AI command with OpenAI client placeholder."""
2220
super().__init__(*args, **kwargs)
2321
self.openai_client: openai.OpenAI | None = None
22+
self.entity_name = self.model_class.__name__.lower()
23+
self.entity_name_plural = self.model_class.__name__.lower() + "s"
2424

2525
def source_name(self) -> str:
2626
"""Return the source name for context creation. Override if different from default."""

backend/apps/ai/management/commands/ai_create_chapter_chunks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77

88
class Command(BaseChunkCommand):
9-
entity_name = "chapter"
10-
entity_name_plural = "chapters"
119
key_field_name = "key"
1210
model_class = Chapter
1311

backend/apps/ai/management/commands/ai_create_committee_chunks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77

88
class Command(BaseChunkCommand):
9-
entity_name = "committee"
10-
entity_name_plural = "committees"
119
key_field_name = "key"
1210
model_class = Committee
1311

backend/apps/ai/management/commands/ai_create_event_chunks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99

1010
class Command(BaseChunkCommand):
11-
entity_name = "event"
12-
entity_name_plural = "events"
1311
key_field_name = "key"
1412
model_class = Event
1513

backend/apps/ai/management/commands/ai_create_project_chunks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99

1010
class Command(BaseChunkCommand):
11-
entity_name = "project"
12-
entity_name_plural = "projects"
1311
key_field_name = "key"
1412
model_class = Project
1513

backend/apps/ai/management/commands/ai_create_slack_message_chunks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88

99
class Command(BaseChunkCommand):
10-
entity_name = "message"
11-
entity_name_plural = "messages"
1210
key_field_name = "slack_message_id"
1311
model_class = Message
1412

backend/apps/ai/management/commands/ai_update_chapter_context.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77

88
class Command(BaseContextCommand):
9-
entity_name = "chapter"
10-
entity_name_plural = "chapters"
119
key_field_name = "key"
1210
model_class = Chapter
1311

backend/apps/ai/management/commands/ai_update_committee_context.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77

88
class Command(BaseContextCommand):
9-
entity_name = "committee"
10-
entity_name_plural = "committees"
119
key_field_name = "key"
1210
model_class = Committee
1311

backend/apps/ai/management/commands/ai_update_event_context.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99

1010
class Command(BaseContextCommand):
11-
entity_name = "event"
12-
entity_name_plural = "events"
1311
key_field_name = "key"
1412
model_class = Event
1513

backend/apps/ai/management/commands/ai_update_project_context.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99

1010
class Command(BaseContextCommand):
11-
entity_name = "project"
12-
entity_name_plural = "projects"
1311
key_field_name = "key"
1412
model_class = Project
1513

0 commit comments

Comments
 (0)