Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsChat modelsAnthropicAnthropic FunctionsAnyscaleAzureAzureML Chat Online EndpointBaichuan ChatBaidu QianfanBedrock ChatCohereERNIE-Bot ChatEverlyAIFireworksGCP Vertex AIJinaChatKonkoüöÖ LiteLLMLlama APIMiniMaxOllamaOpenAIPromptLayer ChatOpenAITongyi QwenvLLM ChatYandexGPTDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsChat modelsAnthropic FunctionsOn this pageAnthropic FunctionsThis notebook shows how to use an experimental wrapper around Anthropic that gives it the same API as OpenAI Functions.from langchain_experimental.llms.anthropic_functions import AnthropicFunctions    /Users/harrisonchase/.pyenv/versions/3.9.1/envs/langchain/lib/python3.9/site-packages/deeplake/util/check_latest_version.py:32: UserWarning: A newer version of deeplake (3.6.14) is available. It's recommended that you update to the latest version using `pip install -U deeplake`.      warnings.warn(Initialize Model‚ÄãYou can initialize this wrapper the same way you'd initialize ChatAnthropicmodel = AnthropicFunctions(model='claude-2')Passing in functions‚ÄãYou can now pass in functions in a similar wayfunctions=[    {      "name": "get_current_weather",      "description": "Get the current weather in a given location",      "parameters": {        "type": "object",        "properties": {          "location": {            "type": "string",            "description": "The city and state, e.g. San Francisco, CA"          },          "unit": {            "type": "string",            "enum": ["celsius", "fahrenheit"]          }        },        "required": ["location"]      }    }  ]from langchain.schema import HumanMessageresponse = model.predict_messages(    [HumanMessage(content="whats the weater in boston?")],
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. ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsChat modelsAnthropicAnthropic FunctionsAnyscaleAzureAzureML Chat Online EndpointBaichuan ChatBaidu QianfanBedrock ChatCohereERNIE-Bot ChatEverlyAIFireworksGCP Vertex AIJinaChatKonkoüöÖ LiteLLMLlama APIMiniMaxOllamaOpenAIPromptLayer ChatOpenAITongyi QwenvLLM ChatYandexGPTDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsChat modelsAnthropic FunctionsOn this pageAnthropic FunctionsThis notebook shows how to use an experimental wrapper around Anthropic that gives it the same API as OpenAI Functions.from langchain_experimental.llms.anthropic_functions import AnthropicFunctions    /Users/harrisonchase/.pyenv/versions/3.9.1/envs/langchain/lib/python3.9/site-packages/deeplake/util/check_latest_version.py:32: UserWarning: A newer version of deeplake (3.6.14) is available. It's recommended that you update to the latest version using `pip install -U deeplake`.      warnings.warn(Initialize Model‚ÄãYou can initialize this wrapper the same way you'd initialize ChatAnthropicmodel = AnthropicFunctions(model='claude-2')Passing in functions‚ÄãYou can now pass in functions in a similar wayfunctions=[    {      "name": "get_current_weather",      "description": "Get the current weather in a given location",      "parameters": {        "type": "object",        "properties": {          "location": {            "type": "string",            "description": "The city and state, e.g. San Francisco, CA"          },          "unit": {            "type": "string",            "enum": ["celsius", "fahrenheit"]          }        },        "required": ["location"]      }    }  ]from langchain.schema import HumanMessageresponse = model.predict_messages(    [HumanMessage(content="whats the weater in boston?")],