diff --git a/instill/configuration/__init__.py b/instill/configuration/__init__.py index 3837086..4e543af 100644 --- a/instill/configuration/__init__.py +++ b/instill/configuration/__init__.py @@ -65,10 +65,10 @@ def save(self) -> None: c, ) - def set_token(self, alias: str, token: str) -> None: - if self._config.hosts is not None: - self._config.hosts[alias].token = token - self.save() + def set_default(self, url: str, token: str, secure: bool): + self._config.hosts["default"] = _InstillHost( + url=url, secure=secure, token=token + ) global_config = Configuration() diff --git a/instill/protogen b/instill/protogen index c949edc..3f9fb80 160000 --- a/instill/protogen +++ b/instill/protogen @@ -1 +1 @@ -Subproject commit c949edcae1ef8e2b578e9c12b1ed18a961648dab +Subproject commit 3f9fb80bd27a07539f91f3ad33832cc0200764a0 diff --git a/instill/resources/pipeline.py b/instill/resources/pipeline.py index 629cc10..4b655c9 100644 --- a/instill/resources/pipeline.py +++ b/instill/resources/pipeline.py @@ -11,7 +11,7 @@ def __init__( self, client: InstillClient, name: str, - recipe: pipeline_interface.Recipe, + recipe: pipeline_interface.Recipe | None = None, ) -> None: super().__init__() self.client = client