orchestrator-core 4.5.0a8__py3-none-any.whl → 4.5.0a9__py3-none-any.whl

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.
orchestrator/__init__.py CHANGED
@@ -13,7 +13,7 @@
13
13
 
14
14
  """This is the orchestrator workflow engine."""
15
15
 
16
- __version__ = "4.5.0a8"
16
+ __version__ = "4.5.0a9"
17
17
 
18
18
 
19
19
  from structlog import get_logger
@@ -43,6 +43,9 @@ class LLMSettings(BaseSettings):
43
43
  LLM_MAX_RETRIES: int = 3
44
44
  LLM_TIMEOUT: int = 30
45
45
 
46
+ # Toggle creation of extensions
47
+ LLM_FORCE_EXTENTION_MIGRATION: bool = False
48
+
46
49
  @field_validator("EMBEDDING_MODEL")
47
50
  def validate_embedding_model_format(cls, v: str) -> str:
48
51
  """Validate that embedding model is in 'vendor/model' format."""
@@ -17,6 +17,7 @@ from sqlalchemy import text
17
17
  from sqlalchemy.engine import Connection
18
18
  from structlog import get_logger
19
19
 
20
+ from orchestrator.llm_settings import llm_settings
20
21
  from orchestrator.search.core.types import FieldType
21
22
 
22
23
  logger = get_logger(__name__)
@@ -30,11 +31,16 @@ def run_migration(connection: Connection) -> None:
30
31
  logger.info("Running LLM migration")
31
32
 
32
33
  try:
33
- # Create PostgreSQL extensions
34
- connection.execute(text("CREATE EXTENSION IF NOT EXISTS ltree;"))
35
- connection.execute(text("CREATE EXTENSION IF NOT EXISTS unaccent;"))
36
- connection.execute(text("CREATE EXTENSION IF NOT EXISTS pg_trgm;"))
37
- connection.execute(text("CREATE EXTENSION IF NOT EXISTS vector;"))
34
+ # Test to see if the extenstion exists and then skip the migration; Needed for certain situations where db user
35
+ # has insufficient priviledges to run the `CREATE EXTENSION ...` command.
36
+ res = connection.execute(text("SELECT * FROM pg_extension where extname = 'vector';"))
37
+ if llm_settings.LLM_FORCE_EXTENTION_MIGRATION or res.rowcount == 0:
38
+ # Create PostgreSQL extensions
39
+ logger.info("Attempting to run the extention creation;")
40
+ connection.execute(text("CREATE EXTENSION IF NOT EXISTS ltree;"))
41
+ connection.execute(text("CREATE EXTENSION IF NOT EXISTS unaccent;"))
42
+ connection.execute(text("CREATE EXTENSION IF NOT EXISTS pg_trgm;"))
43
+ connection.execute(text("CREATE EXTENSION IF NOT EXISTS vector;"))
38
44
 
39
45
  # Create field_type enum
40
46
  field_type_values = "', '".join([ft.value for ft in FieldType])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orchestrator-core
3
- Version: 4.5.0a8
3
+ Version: 4.5.0a9
4
4
  Summary: This is the orchestrator workflow engine.
5
5
  Author-email: SURF <automation-beheer@surf.nl>
6
6
  Requires-Python: >=3.11,<3.14
@@ -1,8 +1,8 @@
1
- orchestrator/__init__.py,sha256=bfe5yk8RiIvi9Pr2-Ym6xKS3wO9qHR93paLma0iVR9A,1449
1
+ orchestrator/__init__.py,sha256=yDsxxSSozQHKwQA16warPVdcW_QAizHXkhNQGtQ-Pjs,1449
2
2
  orchestrator/agentic_app.py,sha256=op7osw7KJRww90iYuWBt_bB5qI-sAkpG0fyr0liubQw,3968
3
3
  orchestrator/app.py,sha256=UPKQuDpg8MWNC6r3SRRbp6l9RBzwb00IMIaGRk-jbCU,13203
4
4
  orchestrator/exception_handlers.py,sha256=UsW3dw8q0QQlNLcV359bIotah8DYjMsj2Ts1LfX4ClY,1268
5
- orchestrator/llm_settings.py,sha256=RjOY-FRVd648HYa6Im8ni4h76KlLFja36zlGD14sPeY,2231
5
+ orchestrator/llm_settings.py,sha256=UDehiEVXkRMfmPSfCTHQX8dtH2gLCGtZK_wQTU3yISg,2316
6
6
  orchestrator/log_config.py,sha256=1cPl_OXT4tEUyNxG8cwIWXrmadUm1E81vq0mdtrV-v4,1912
7
7
  orchestrator/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  orchestrator/security.py,sha256=iXFxGxab54aav7oHEKLAVkTgrQMJGHy6IYLojEnD7gI,2422
@@ -276,7 +276,7 @@ orchestrator/schemas/subscription.py,sha256=-jXyHZIed9Xlia18ksSDyenblNN6Q2yM2FlG
276
276
  orchestrator/schemas/subscription_descriptions.py,sha256=Ft_jw1U0bf9Z0U8O4OWfLlcl0mXCVT_qYVagBP3GbIQ,1262
277
277
  orchestrator/schemas/workflow.py,sha256=StVoRGyNT2iIeq3z8BIlTPt0bcafzbeYxXRrCucR6LU,2146
278
278
  orchestrator/search/__init__.py,sha256=2uhTQexKx-cdBP1retV3CYSNCs02s8WL3fhGvupRGZk,571
279
- orchestrator/search/llm_migration.py,sha256=UvFyzLGhlfPulA9T1pcpq8HnRd7Uu2ssKqW_N5NMeQk,3962
279
+ orchestrator/search/llm_migration.py,sha256=BklTa8xg85b26j4dadRji_tjaIWU3L0a9B3buwuld0E,4475
280
280
  orchestrator/search/agent/__init__.py,sha256=_b7Q43peWSi2bb3-69CThAqt_sxgoaMbHeq6erLGR00,752
281
281
  orchestrator/search/agent/agent.py,sha256=zhDyXwRf118vH96CmKRbo5O8GKl_mnLJTDNfWgvsKeE,2450
282
282
  orchestrator/search/agent/prompts.py,sha256=-1VLYwPecC6xroKQTc9AE9MTtg_ffAUfHUi8ZATyUMg,4556
@@ -369,7 +369,7 @@ orchestrator/workflows/tasks/resume_workflows.py,sha256=T3iobSJjVgiupe0rClD34kUZ
369
369
  orchestrator/workflows/tasks/validate_product_type.py,sha256=paG-NAY1bdde3Adt8zItkcBKf5Pxw6f5ngGW6an6dYU,3192
370
370
  orchestrator/workflows/tasks/validate_products.py,sha256=kXBGZTkobfYH8e_crhdErT-ypdouH0a3_WLImmbKXcE,8523
371
371
  orchestrator/workflows/translations/en-GB.json,sha256=ST53HxkphFLTMjFHonykDBOZ7-P_KxksktZU3GbxLt0,846
372
- orchestrator_core-4.5.0a8.dist-info/licenses/LICENSE,sha256=b-aA5OZQuuBATmLKo_mln8CQrDPPhg3ghLzjPjLn4Tg,11409
373
- orchestrator_core-4.5.0a8.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
374
- orchestrator_core-4.5.0a8.dist-info/METADATA,sha256=kPLUhDg7J-mr72Nwo-oB9hEFmhp_xihUJ7JFWHFq64A,6252
375
- orchestrator_core-4.5.0a8.dist-info/RECORD,,
372
+ orchestrator_core-4.5.0a9.dist-info/licenses/LICENSE,sha256=b-aA5OZQuuBATmLKo_mln8CQrDPPhg3ghLzjPjLn4Tg,11409
373
+ orchestrator_core-4.5.0a9.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
374
+ orchestrator_core-4.5.0a9.dist-info/METADATA,sha256=1jwY-62mr5ijsdcC1gIINZNuLJBD6FtZ-qlkSRYOKsQ,6252
375
+ orchestrator_core-4.5.0a9.dist-info/RECORD,,