INNER CODE UNIT · Python

stage

concierge-hq/concierge · __init__.py:250

    def stage(self, name: str) -> Callable:
        """Decorator to assign a tool to a stage.

        Example:
            @app.stage("browse")
            @app.tool()
            def search_items(query: str):
                return {"items": [...]}
        """

        def decorator(fn: Callable) -> Callable:
            tool_name = fn.__name__
            if name not in self._stages:
                self._stages[name] = []
            if tool_name not in self._stages[name]:
                self._stages[name].append(tool_name)
            return fn

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…