3737import msgspec
3838from architecture import log
3939from architecture .utils .functions import run_sync
40- from intellibricks .llms import Synapse , SynapseCascade
40+ from intellibricks .llms import Synapse , SynapseCascade , SynapseProtocol
4141from intellibricks .llms .util import get_struct_from_schema
4242from markdownify import markdownify as md
4343from playwright .async_api import async_playwright , Browser
@@ -59,28 +59,28 @@ class Webson(msgspec.Struct):
5959 A class for extracting webpage contents and converting them into structured data using an LLM.
6060
6161 Attributes:
62- llm (Synapse | SynapseCascade ):
62+ llm (SynapseProtocol ):
6363 The underlying LLM interface used for generating structured outputs.
6464 timeout (int | None):
6565 Optional timeout (in milliseconds) for page loads in Playwright.
6666 """
6767
68- llm : Synapse | SynapseCascade
68+ llm : SynapseProtocol
6969 """The synapse weaver used to perform its operations."""
7070
7171 timeout : int | None = None
7272 """Timeout (in milliseconds) to use for page loads. If None, the default timeout is used."""
7373
7474 @classmethod
75- def create (cls , llm : Synapse | SynapseCascade | OpenAI | None ) -> Webson :
75+ def create (cls , llm : SynapseProtocol | OpenAI | None ) -> Webson :
7676 """
7777 Creates a Webson instance from an LLM instance.
7878
7979 This factory method accepts an instance of either Synapse, SynapseCascade, or OpenAI.
8080 When an OpenAI instance is provided, it wraps it as a Synapse using the 'gpt-4o' model.
8181
8282 Args:
83- llm (Synapse | SynapseCascade | OpenAI): The LLM instance to be used.
83+ llm (SynapseProtocol | OpenAI): The LLM instance to be used.
8484
8585 Returns:
8686 Webson: A new instance of Webson configured with the appropriate llm.
0 commit comments