37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
# Copyright (c) 2023 - 2025, AG2ai, Inc., AG2ai open-source projects maintainers and core contributors
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# Portions derived from https://github.com/microsoft/autogen are under the MIT License.
|
|
# SPDX-License-Identifier: MIT
|
|
from dataclasses import dataclass
|
|
from typing import Optional, Protocol, runtime_checkable
|
|
|
|
from ...doc_utils import export_module
|
|
|
|
|
|
@dataclass
|
|
@export_module("autogen.coding.jupyter")
|
|
class JupyterConnectionInfo:
|
|
"""(Experimental)"""
|
|
|
|
host: str
|
|
"""`str` - Host of the Jupyter gateway server"""
|
|
use_https: bool
|
|
"""`bool` - Whether to use HTTPS"""
|
|
port: Optional[int] = None
|
|
"""`Optional[int]` - Port of the Jupyter gateway server. If None, the default port is used"""
|
|
token: Optional[str] = None
|
|
"""`Optional[str]` - Token for authentication. If None, no token is used"""
|
|
|
|
|
|
@runtime_checkable
|
|
@export_module("autogen.coding.jupyter")
|
|
class JupyterConnectable(Protocol):
|
|
"""(Experimental)"""
|
|
|
|
@property
|
|
def connection_info(self) -> JupyterConnectionInfo:
|
|
"""Return the connection information for this connectable."""
|
|
pass
|