prompts and requests', additional_kwargs={}, example=False)full_chain.invoke({"question": "whats 2 + 2"})    AIMessage(content=' 2 + 2 = 4', additional_kwargs={}, example=False)Using a custom function‚ÄãYou can also use a custom function to route between different outputs. Here's an example:def route(info):    if "anthropic" in info["topic"].lower():        return anthropic_chain    elif "langchain" in info["topic"].lower():        return langchain_chain    else:        return general_chainfrom langchain.schema.runnable import RunnableLambdafull_chain = {    "topic": chain,    "question": lambda x: x["question"]} | RunnableLambda(route)full_chain.invoke({"question": "how do I use Anthroipc?"})    AIMessage(content=' As Dario Amodei told me, to use Anthropic IPC you first need to import it:\n\n```python\nfrom anthroipc import ic\n```\n\nThen you can create a client and connect to the server:\n\n```python \nclient = ic.connect()\n```\n\nAfter that, you can call methods on the client and get responses:\n\n```python\nresponse = client.ask("What is the meaning of life?")\nprint(response)\n```\n\nYou can also register callbacks to handle events: \n\n```python\ndef on_poke(event):\n  print("Got poked!")\n\nclient.on(\'poke\', on_poke)\n```\n\nAnd that\'s the basics of using the Anthropic IPC client library for Python! Let me know if you have any other questions!', additional_kwargs={}, example=False)full_chain.invoke({"question": "how do I use LangChain?"})    AIMessage(content=' As Harrison Chase told me, to use LangChain you first need to sign up for an API key at platform.langchain.com. Once you have your API key, you can install the Python library and write a simple Python script to call the LangChain API. Here is some sample code to get started:\n\n```python\nimport langchain\n\napi_key = "YOUR_API_KEY"\n\nlangchain.set_key(api_key)\n\nresponse = langchain.ask("What is the capital of France?")\n\nprint(response.response)\n```\n\nThis will send the question "What is
This notebook covers how to do routing in the LangChain Expression Language.
This notebook covers how to do routing in the LangChain Expression Language. ->: prompts and requests', additional_kwargs={}, example=False)full_chain.invoke({"question": "whats 2 + 2"})    AIMessage(content=' 2 + 2 = 4', additional_kwargs={}, example=False)Using a custom function‚ÄãYou can also use a custom function to route between different outputs. Here's an example:def route(info):    if "anthropic" in info["topic"].lower():        return anthropic_chain    elif "langchain" in info["topic"].lower():        return langchain_chain    else:        return general_chainfrom langchain.schema.runnable import RunnableLambdafull_chain = {    "topic": chain,    "question": lambda x: x["question"]} | RunnableLambda(route)full_chain.invoke({"question": "how do I use Anthroipc?"})    AIMessage(content=' As Dario Amodei told me, to use Anthropic IPC you first need to import it:\n\n```python\nfrom anthroipc import ic\n```\n\nThen you can create a client and connect to the server:\n\n```python \nclient = ic.connect()\n```\n\nAfter that, you can call methods on the client and get responses:\n\n```python\nresponse = client.ask("What is the meaning of life?")\nprint(response)\n```\n\nYou can also register callbacks to handle events: \n\n```python\ndef on_poke(event):\n  print("Got poked!")\n\nclient.on(\'poke\', on_poke)\n```\n\nAnd that\'s the basics of using the Anthropic IPC client library for Python! Let me know if you have any other questions!', additional_kwargs={}, example=False)full_chain.invoke({"question": "how do I use LangChain?"})    AIMessage(content=' As Harrison Chase told me, to use LangChain you first need to sign up for an API key at platform.langchain.com. Once you have your API key, you can install the Python library and write a simple Python script to call the LangChain API. Here is some sample code to get started:\n\n```python\nimport langchain\n\napi_key = "YOUR_API_KEY"\n\nlangchain.set_key(api_key)\n\nresponse = langchain.ask("What is the capital of France?")\n\nprint(response.response)\n```\n\nThis will send the question "What is