prism-models 0.1.1__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of prism-models might be problematic. Click here for more details.
- {prism_models-0.1.1 → prism_models-0.1.3}/PKG-INFO +1 -1
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/__init__.py +2 -1
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/agent_profile.py +27 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/content.py +1 -0
- prism_models-0.1.3/prism_models/migration/versions/2025_10_23_1228_919d07a93f83_added_sharepoint_directory_in_source.py +32 -0
- prism_models-0.1.3/prism_models/migration/versions/2025_10_27_1331_ff3be2c4311f_added_agentcollectionaccess_table.py +50 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models.egg-info/PKG-INFO +1 -1
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models.egg-info/SOURCES.txt +3 -1
- {prism_models-0.1.1 → prism_models-0.1.3}/pyproject.toml +1 -1
- {prism_models-0.1.1 → prism_models-0.1.3}/README.md +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/base.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/chat.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/config.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/feedback.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/README +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/__init__.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/env.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/script.py.mako +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_09_11_1516_161f8829d93f_initial_schema.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_09_11_1558_5e011849ea76_changes_for_feedback.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_09_14_2243_059af231c2b2_profile_entities.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_09_15_1646_3219fec0bb10_agent_changes.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_09_16_1627_f2013b08daac_rename_metadata_to_additional_data.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_09_17_1147_327febbf555f_display_name_added.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_09_18_1106_b0bcb7ca1dc9_add_support_for_profile_on_create_convo.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_09_18_1511_bbc1955191e6_preview_mode.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_09_26_1115_6eb70e848451_added_publish_status_to_document.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_09_26_1240_f8b0ea2e743c_drop_unique_title_version_on_document.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_09_26_1505_07dc8c2589e0_added_chunk_id_and_vector_embeddings_to_.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_09_29_1220_46ba2693b883_add_markdown_markdown_file_path_s3_.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_10_02_1520_bf1472a9b021_removed_doc_id_from_config_table_and_.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_10_02_1525_6c0e63e0fef8_removed_doc_id_from_config_table_.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_10_02_1608_1b3eb48f5017_config_id_on_delete_will_be_set_to_null.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_10_03_1109_ac85b606d8a4_added_docling_hybrid_to_chunkstrategy.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_10_03_1204_7d1cb343a63f_added_s3_bucket_and_s3_dir_in_source_.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_10_03_1452_f9c750ec2a0b_1_to_1_relationship_between_collection_.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_10_07_1722_5cfa0c462948_added_travel_advisory_enum.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_10_08_1304_c91eb8e38cc7_added_destination_report_and_event_.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_10_09_1308_796b720ea35f_added_qa_id_to_vovetor.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/migration/versions/2025_10_16_1611_663c66268631_added_sharepoint_drive_item_id_as_an_.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models/qdrant.py +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models.egg-info/dependency_links.txt +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models.egg-info/requires.txt +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/prism_models.egg-info/top_level.txt +0 -0
- {prism_models-0.1.1 → prism_models-0.1.3}/setup.cfg +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
__version__ = "0.1.0"
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
from prism_models.agent_profile import Agent, AgentProfile, AgentProfileStatus, Profile, ProfileCollectionAccess
|
|
6
|
+
from prism_models.agent_profile import Agent, AgentCollectionAccess, AgentProfile, AgentProfileStatus, Profile, ProfileCollectionAccess
|
|
7
7
|
from prism_models.base import POSTGRES_NAMING_CONVENTION, Base, BaseModel, TimestampMixin
|
|
8
8
|
from prism_models.chat import Contact, Conversation, ConversationMessage, ConversationMessageMetadata
|
|
9
9
|
from prism_models.content import Chunk, ChunkConfig, Collection, CollectionDocument, Document, IntegrationConfig, QAPair, Source, Vector
|
|
@@ -13,6 +13,7 @@ from prism_models.qdrant import QdrantVectorPayload, DestinationVectorPayload, P
|
|
|
13
13
|
__all__ = [
|
|
14
14
|
"POSTGRES_NAMING_CONVENTION",
|
|
15
15
|
"Agent",
|
|
16
|
+
"AgentCollectionAccess",
|
|
16
17
|
"AgentProfile",
|
|
17
18
|
"AgentProfileStatus",
|
|
18
19
|
"Augmentation",
|
|
@@ -99,3 +99,30 @@ class ProfileCollectionAccess(BaseModel):
|
|
|
99
99
|
collection: Mapped["Collection"] = relationship()
|
|
100
100
|
|
|
101
101
|
__table_args__ = (UniqueConstraint("profile_id", "collection_id", name="uq_profile_collection"),)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class AgentCollectionAccess(BaseModel):
|
|
105
|
+
"""AgentCollectionAccess model for storing agent collection information."""
|
|
106
|
+
|
|
107
|
+
agent_id: Mapped[int] = mapped_column(
|
|
108
|
+
Integer,
|
|
109
|
+
ForeignKey("agent.id", ondelete="CASCADE"),
|
|
110
|
+
nullable=False,
|
|
111
|
+
index=True,
|
|
112
|
+
)
|
|
113
|
+
collection_id: Mapped[int] = mapped_column(
|
|
114
|
+
Integer,
|
|
115
|
+
ForeignKey("collection.id", ondelete="CASCADE"),
|
|
116
|
+
nullable=False,
|
|
117
|
+
index=True,
|
|
118
|
+
)
|
|
119
|
+
access_granted_at: Mapped[datetime] = mapped_column(
|
|
120
|
+
TIMESTAMP(timezone=True),
|
|
121
|
+
server_default=func.now(),
|
|
122
|
+
nullable=True,
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
agent: Mapped["Agent"] = relationship()
|
|
126
|
+
collection: Mapped["Collection"] = relationship()
|
|
127
|
+
|
|
128
|
+
__table_args__ = (UniqueConstraint("agent_id", "collection_id", name="uq_agent_collection"),)
|
|
@@ -96,6 +96,7 @@ class Source(BaseModel):
|
|
|
96
96
|
s3_bucket: Mapped[str | None] = mapped_column(String(255), nullable=True)
|
|
97
97
|
s3_directory: Mapped[str | None] = mapped_column(String(2048), nullable=True)
|
|
98
98
|
|
|
99
|
+
sharepoint_directory: Mapped[str | None] = mapped_column(String(2048), nullable=True)
|
|
99
100
|
# One-to-one relationship to Collection via unique FK - NOTE NOT UNIQUE
|
|
100
101
|
collection_id: Mapped[int | None] = mapped_column(
|
|
101
102
|
Integer, ForeignKey("collection.id"), nullable=False, unique=True, index=True
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""added sharepoint_directory in source
|
|
2
|
+
|
|
3
|
+
Revision ID: 919d07a93f83
|
|
4
|
+
Revises: 663c66268631
|
|
5
|
+
Create Date: 2025-10-23 12:28:57.570381
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
from typing import Sequence, Union
|
|
9
|
+
|
|
10
|
+
from alembic import op
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision: str = '919d07a93f83'
|
|
16
|
+
down_revision: Union[str, Sequence[str], None] = '663c66268631'
|
|
17
|
+
branch_labels: Union[str, Sequence[str], None] = None
|
|
18
|
+
depends_on: Union[str, Sequence[str], None] = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def upgrade() -> None:
|
|
22
|
+
"""Upgrade schema."""
|
|
23
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
|
24
|
+
op.add_column('source', sa.Column('sharepoint_directory', sa.String(length=2048), nullable=True))
|
|
25
|
+
# ### end Alembic commands ###
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def downgrade() -> None:
|
|
29
|
+
"""Downgrade schema."""
|
|
30
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
|
31
|
+
op.drop_column('source', 'sharepoint_directory')
|
|
32
|
+
# ### end Alembic commands ###
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""added AgentCollectionAccess table
|
|
2
|
+
|
|
3
|
+
Revision ID: ff3be2c4311f
|
|
4
|
+
Revises: 919d07a93f83
|
|
5
|
+
Create Date: 2025-10-27 13:31:19.882851
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
from typing import Sequence, Union
|
|
9
|
+
|
|
10
|
+
from alembic import op
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision: str = 'ff3be2c4311f'
|
|
16
|
+
down_revision: Union[str, Sequence[str], None] = '919d07a93f83'
|
|
17
|
+
branch_labels: Union[str, Sequence[str], None] = None
|
|
18
|
+
depends_on: Union[str, Sequence[str], None] = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def upgrade() -> None:
|
|
22
|
+
"""Upgrade schema."""
|
|
23
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
|
24
|
+
op.create_table('agent_collection_access',
|
|
25
|
+
sa.Column('agent_id', sa.Integer(), nullable=False),
|
|
26
|
+
sa.Column('collection_id', sa.Integer(), nullable=False),
|
|
27
|
+
sa.Column('access_granted_at', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=True),
|
|
28
|
+
sa.Column('id', sa.Integer(), nullable=False),
|
|
29
|
+
sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=False),
|
|
30
|
+
sa.Column('updated_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=False),
|
|
31
|
+
sa.Column('deleted_at', sa.DateTime(timezone=True), nullable=True),
|
|
32
|
+
sa.ForeignKeyConstraint(['agent_id'], ['agent.id'], name=op.f('agent_collection_access_agent_id_fkey'), ondelete='CASCADE'),
|
|
33
|
+
sa.ForeignKeyConstraint(['collection_id'], ['collection.id'], name=op.f('agent_collection_access_collection_id_fkey'), ondelete='CASCADE'),
|
|
34
|
+
sa.PrimaryKeyConstraint('id', name=op.f('agent_collection_access_pkey')),
|
|
35
|
+
sa.UniqueConstraint('agent_id', 'collection_id', name='uq_agent_collection')
|
|
36
|
+
)
|
|
37
|
+
op.create_index(op.f('agent_collection_access_agent_id_idx'), 'agent_collection_access', ['agent_id'], unique=False)
|
|
38
|
+
op.create_index(op.f('agent_collection_access_collection_id_idx'), 'agent_collection_access', ['collection_id'], unique=False)
|
|
39
|
+
op.create_index(op.f('agent_collection_access_id_idx'), 'agent_collection_access', ['id'], unique=False)
|
|
40
|
+
# ### end Alembic commands ###
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def downgrade() -> None:
|
|
44
|
+
"""Downgrade schema."""
|
|
45
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
|
46
|
+
op.drop_index(op.f('agent_collection_access_id_idx'), table_name='agent_collection_access')
|
|
47
|
+
op.drop_index(op.f('agent_collection_access_collection_id_idx'), table_name='agent_collection_access')
|
|
48
|
+
op.drop_index(op.f('agent_collection_access_agent_id_idx'), table_name='agent_collection_access')
|
|
49
|
+
op.drop_table('agent_collection_access')
|
|
50
|
+
# ### end Alembic commands ###
|
|
@@ -38,4 +38,6 @@ prism_models/migration/versions/2025_10_03_1452_f9c750ec2a0b_1_to_1_relationship
|
|
|
38
38
|
prism_models/migration/versions/2025_10_07_1722_5cfa0c462948_added_travel_advisory_enum.py
|
|
39
39
|
prism_models/migration/versions/2025_10_08_1304_c91eb8e38cc7_added_destination_report_and_event_.py
|
|
40
40
|
prism_models/migration/versions/2025_10_09_1308_796b720ea35f_added_qa_id_to_vovetor.py
|
|
41
|
-
prism_models/migration/versions/2025_10_16_1611_663c66268631_added_sharepoint_drive_item_id_as_an_.py
|
|
41
|
+
prism_models/migration/versions/2025_10_16_1611_663c66268631_added_sharepoint_drive_item_id_as_an_.py
|
|
42
|
+
prism_models/migration/versions/2025_10_23_1228_919d07a93f83_added_sharepoint_directory_in_source.py
|
|
43
|
+
prism_models/migration/versions/2025_10_27_1331_ff3be2c4311f_added_agentcollectionaccess_table.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|