MCPcopy
hub / github.com/Agenta-AI/agenta / commit

Method commit

sdk/agenta/sdk/managers/shared.py:458–487  ·  view source on GitHub ↗
(
        cls,
        *,
        parameters: dict,
        variant_slug: str,
        #
        app_id: Optional[str] = None,
        app_slug: Optional[str] = None,
    )

Source from the content-addressed store, hash-verified

456 @classmethod
457 @handle_exceptions()
458 def commit(
459 cls,
460 *,
461 parameters: dict,
462 variant_slug: str,
463 #
464 app_id: Optional[str] = None,
465 app_slug: Optional[str] = None,
466 ):
467 variant_ref = SharedManager._ref_or_none( # type: ignore # type: ignore
468 slug=variant_slug,
469 version=None,
470 id=None,
471 )
472 application_ref = SharedManager._ref_or_none( # type: ignore # type: ignore
473 slug=app_slug,
474 version=None,
475 id=app_id,
476 )
477 config_response = ag.api.variants.configs_commit( # type: ignore
478 config=ConfigRequest(
479 params=parameters,
480 variant_ref=variant_ref.model_dump() if variant_ref else None, # type: ignore
481 application_ref=application_ref.model_dump() if application_ref else None, # type: ignore
482 )
483 )
484
485 response = SharedManager._parse_config_response(config_response)
486
487 return ConfigurationResponse(**response)
488
489 @classmethod
490 @handle_exceptions()

Callers 15

test_variant_commitFunction · 0.45
create_new_variant_baseFunction · 0.45
create_new_app_variantFunction · 0.45
create_deploymentFunction · 0.45
create_app_and_envsFunction · 0.45
update_appFunction · 0.45
delete_accountsFunction · 0.45
create_organizationFunction · 0.45
create_workspaceFunction · 0.45
update_organizationFunction · 0.45

Calls 6

ConfigRequestClass · 0.85
_ref_or_noneMethod · 0.80
configs_commitMethod · 0.45
model_dumpMethod · 0.45

Tested by 4

test_variant_commitFunction · 0.36
get_first_user_objectFunction · 0.36
get_second_user_objectFunction · 0.36