the weater in boston?")],     functions=functions)response    AIMessage(content=' ', additional_kwargs={'function_call': {'name': 'get_current_weather', 'arguments': '{"location": "Boston, MA", "unit": "fahrenheit"}'}}, example=False)Using for extraction‚ÄãYou can now use this for extraction.from langchain.chains import create_extraction_chainschema = {    "properties": {        "name": {"type": "string"},        "height": {"type": "integer"},        "hair_color": {"type": "string"},    },    "required": ["name", "height"],}inp = """Alex is 5 feet tall. Claudia is 1 feet taller Alex and jumps higher than him. Claudia is a brunette and Alex is blonde.        """chain = create_extraction_chain(schema, model)chain.run(inp)    [{'name': 'Alex', 'height': '5', 'hair_color': 'blonde'},     {'name': 'Claudia', 'height': '6', 'hair_color': 'brunette'}]Using for tagging‚ÄãYou can now use this for taggingfrom langchain.chains import create_tagging_chainschema = {    "properties": {        "sentiment": {"type": "string"},        "aggressiveness": {"type": "integer"},        "language": {"type": "string"},    }}chain = create_tagging_chain(schema, model)chain.run("this is really cool")    {'sentiment': 'positive', 'aggressiveness': '0', 'language': 'english'}PreviousAnthropicNextAnyscaleInitialize ModelPassing in functionsUsing for extractionUsing for taggingCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This notebook shows how to use an experimental wrapper around Anthropic that gives it the same API as OpenAI Functions.
This notebook shows how to use an experimental wrapper around Anthropic that gives it the same API as OpenAI Functions. ->: the weater in boston?")],     functions=functions)response    AIMessage(content=' ', additional_kwargs={'function_call': {'name': 'get_current_weather', 'arguments': '{"location": "Boston, MA", "unit": "fahrenheit"}'}}, example=False)Using for extraction‚ÄãYou can now use this for extraction.from langchain.chains import create_extraction_chainschema = {    "properties": {        "name": {"type": "string"},        "height": {"type": "integer"},        "hair_color": {"type": "string"},    },    "required": ["name", "height"],}inp = """Alex is 5 feet tall. Claudia is 1 feet taller Alex and jumps higher than him. Claudia is a brunette and Alex is blonde.        """chain = create_extraction_chain(schema, model)chain.run(inp)    [{'name': 'Alex', 'height': '5', 'hair_color': 'blonde'},     {'name': 'Claudia', 'height': '6', 'hair_color': 'brunette'}]Using for tagging‚ÄãYou can now use this for taggingfrom langchain.chains import create_tagging_chainschema = {    "properties": {        "sentiment": {"type": "string"},        "aggressiveness": {"type": "integer"},        "language": {"type": "string"},    }}chain = create_tagging_chain(schema, model)chain.run("this is really cool")    {'sentiment': 'positive', 'aggressiveness': '0', 'language': 'english'}PreviousAnthropicNextAnyscaleInitialize ModelPassing in functionsUsing for extractionUsing for taggingCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.