of our chain... just turn the streaming on/off on prompt/prompt type...The streaming will happen only if we call it in streaming context ... there we can define a simple function to handle the stream# this code example is complete and should run as it isfrom langchain_decorators import StreamingContext, llm_prompt# this will mark the prompt for streaming (useful if we want stream just some prompts in our app... but don't want to pass distribute the callback handlers)# note that only async functions can be streamed (will get an error if it's not)@llm_prompt(capture_stream=True) async def write_me_short_post(topic:str, platform:str="twitter", audience:str = "developers"):    """    Write me a short header for my post about {topic} for {platform} platform.     It should be for {audience} audience.    (Max 15 words)    """    pass# just an arbitrary  function to demonstrate the streaming... will be some websockets code in the real worldtokens=[]def capture_stream_func(new_token:str):    tokens.append(new_token)# if we want to capture the stream, we need to wrap the execution into StreamingContext... # this will allow us to capture the stream even if the prompt call is hidden inside higher level method# only the prompts marked with capture_stream will be captured herewith StreamingContext(stream_to_stdout=True, callback=capture_stream_func):    result = await run_prompt()    print("Stream finished ... we can distinguish tokens thanks to alternating colors")print("\nWe've captured",len(tokens),"tokensüéâ\n")print("Here is the result:")print(result)Prompt declarationsBy default the prompt is is the whole function docs, unless you mark your prompt Documenting your prompt‚ÄãWe can specify what part of our docs is the prompt definition, by specifying a code block with <prompt> language tag@llm_promptdef write_me_short_post(topic:str, platform:str="twitter", audience:str = "developers"):    """    Here is a good way to write a prompt as part of a function docstring, with
lanchchain decorators is a layer on the top of LangChain that provides syntactic sugar üç≠ for writing custom langchain prompts and chains
lanchchain decorators is a layer on the top of LangChain that provides syntactic sugar üç≠ for writing custom langchain prompts and chains ->: of our chain... just turn the streaming on/off on prompt/prompt type...The streaming will happen only if we call it in streaming context ... there we can define a simple function to handle the stream# this code example is complete and should run as it isfrom langchain_decorators import StreamingContext, llm_prompt# this will mark the prompt for streaming (useful if we want stream just some prompts in our app... but don't want to pass distribute the callback handlers)# note that only async functions can be streamed (will get an error if it's not)@llm_prompt(capture_stream=True) async def write_me_short_post(topic:str, platform:str="twitter", audience:str = "developers"):    """    Write me a short header for my post about {topic} for {platform} platform.     It should be for {audience} audience.    (Max 15 words)    """    pass# just an arbitrary  function to demonstrate the streaming... will be some websockets code in the real worldtokens=[]def capture_stream_func(new_token:str):    tokens.append(new_token)# if we want to capture the stream, we need to wrap the execution into StreamingContext... # this will allow us to capture the stream even if the prompt call is hidden inside higher level method# only the prompts marked with capture_stream will be captured herewith StreamingContext(stream_to_stdout=True, callback=capture_stream_func):    result = await run_prompt()    print("Stream finished ... we can distinguish tokens thanks to alternating colors")print("\nWe've captured",len(tokens),"tokensüéâ\n")print("Here is the result:")print(result)Prompt declarationsBy default the prompt is is the whole function docs, unless you mark your prompt Documenting your prompt‚ÄãWe can specify what part of our docs is the prompt definition, by specifying a code block with <prompt> language tag@llm_promptdef write_me_short_post(topic:str, platform:str="twitter", audience:str = "developers"):    """    Here is a good way to write a prompt as part of a function docstring, with