MCPcopy
hub / github.com/learnhouse/learnhouse / CourseEmbedding

Class CourseEmbedding

apps/api/src/db/course_embeddings.py:7–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6
7class CourseEmbedding(SQLModel, table=True):
8 __tablename__ = "course_embedding"
9 __table_args__ = (
10 Index("ix_course_embedding_org_id", "org_id"),
11 Index("ix_course_embedding_course_id", "course_id"),
12 )
13
14 id: Optional[int] = Field(default=None, primary_key=True)
15 org_id: int = Field(
16 sa_column=Column(Integer, ForeignKey("organization.id", ondelete="CASCADE"))
17 )
18 course_id: int = Field(
19 sa_column=Column(Integer, ForeignKey("course.id", ondelete="CASCADE"))
20 )
21 activity_id: Optional[int] = Field(
22 default=None,
23 sa_column=Column(Integer, ForeignKey("activity.id", ondelete="CASCADE"), nullable=True),
24 )
25 activity_uuid: str = ""
26 block_uuid: Optional[str] = None
27 source_type: str = "" # dynamic_page, pdf_block, image_block, audio_block, quiz_block, custom_block, document_activity
28 chunk_text: str = Field(default="", sa_column=Column(Text))
29 chunk_index: int = 0
30 activity_name: str = ""
31 chapter_name: str = ""
32 course_name: str = ""
33 embedding: list = Field(sa_column=Column(Vector(768)))
34 creation_date: str = ""
35 update_date: str = ""

Callers 1

embed_course_contentFunction · 0.90

Calls 1

FieldFunction · 0.50

Tested by

no test coverage detected