Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community[patch]: anthropic add tool call support new tools api #5640

Merged
49 changes: 23 additions & 26 deletions docs/core_docs/docs/integrations/chat/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ sidebar_class_name: hidden

# Chat models

<!-- This file is autogenerated. Do not edit directly. -->
<!-- See `scripts/model-docs.table.js` for details -->

## Features (natively supported)

All ChatModels implement the Runnable interface, which comes with default implementations of all methods, ie. `invoke`, `batch`, `stream`. This gives all ChatModels basic support for invoking, streaming and batching, which by default is implemented as below:
Expand All @@ -24,26 +21,26 @@ Some models in LangChain have also implemented a `withStructuredOutput()` method

The table shows, for each integration, which features have been implemented with native support. Yellow circles (🟡) indicates partial support - for example, if the model supports tool calling but not tool messages for agents.

| Model | Invoke | Stream | Batch | Function Calling | Tool Calling | `withStructuredOutput()` |
| :---------------------- | :----: | :----: | :---: | :--------------: | :----------: | :----------------------: |
| BedrockChat | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatAlibabaTongyi | ✅ | ❌ | ✅ | ❌ | | ❌ |
| ChatAnthropic | ✅ | ✅ | ✅ | ❌ | | ✅ |
| ChatBaiduWenxin | ✅ | ❌ | ✅ | ❌ | | ❌ |
| ChatCloudflareWorkersAI | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatCohere | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatFireworks | ✅ | ✅ | ✅ | ✅ | | ❌ |
| ChatGoogleGenerativeAI | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatGoogleVertexAI | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatVertexAI | ✅ | ✅ | ✅ | ❌ | | ✅ |
| ChatGooglePaLM | ✅ | ❌ | ✅ | ❌ | | ❌ |
| ChatGroq | ✅ | ✅ | ✅ | ❌ | 🟡 | ✅ |
| ChatLlamaCpp | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatMinimax | ✅ | ❌ | ✅ | ✅ | | ❌ |
| ChatMistralAI | ✅ | ❌ | ✅ | ❌ | | ✅ |
| ChatOllama | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatOpenAI | ✅ | ✅ | ✅ | ✅ | | ✅ |
| ChatTencentHunyuan | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatTogetherAI | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatYandexGPT | ✅ | ❌ | ✅ | ❌ | | ❌ |
| ChatZhipuAI | ✅ | ❌ | ✅ | ❌ | | ❌ |
| Model | Invoke | Stream | Batch | Function Calling | Tool Calling | `withStructuredOutput()` |
| :---------------------- | :----: | :----: | :---: | :--------------: | :-------------------------: | :----------------------: |
| BedrockChat | ✅ | ✅ | ✅ | ❌ | 🟡 (Bedrock Anthropic only) | ❌ |
| ChatAlibabaTongyi | ✅ | ❌ | ✅ | ❌ | | ❌ |
| ChatAnthropic | ✅ | ✅ | ✅ | ❌ | | ✅ |
| ChatBaiduWenxin | ✅ | ❌ | ✅ | ❌ | | ❌ |
| ChatCloudflareWorkersAI | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatCohere | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatFireworks | ✅ | ✅ | ✅ | ✅ | | ❌ |
| ChatGoogleGenerativeAI | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatGoogleVertexAI | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatVertexAI | ✅ | ✅ | ✅ | ❌ | | ✅ |
| ChatGooglePaLM | ✅ | ❌ | ✅ | ❌ | | ❌ |
| ChatGroq | ✅ | ✅ | ✅ | ❌ | 🟡 | ✅ |
| ChatLlamaCpp | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatMinimax | ✅ | ❌ | ✅ | ✅ | | ❌ |
| ChatMistralAI | ✅ | ❌ | ✅ | ❌ | | ✅ |
| ChatOllama | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatOpenAI | ✅ | ✅ | ✅ | ✅ | | ✅ |
| ChatTencentHunyuan | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatTogetherAI | ✅ | ✅ | ✅ | ❌ | | ❌ |
| ChatYandexGPT | ✅ | ❌ | ✅ | ❌ | | ❌ |
| ChatZhipuAI | ✅ | ❌ | ✅ | ❌ | | ❌ |
2 changes: 1 addition & 1 deletion libs/langchain-community/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"author": "LangChain",
"license": "MIT",
"dependencies": {
"@langchain/core": "~0.2.0",
"@langchain/core": "~0.2.6",
"@langchain/openai": "~0.1.0",
"binary-extensions": "^2.2.0",
"expr-eval": "^2.0.2",
Expand Down
2 changes: 1 addition & 1 deletion libs/langchain-community/src/chat_models/bedrock/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {

import type { BaseChatModelParams } from "@langchain/core/language_models/chat_models";

import { BaseBedrockInput } from "../../utils/bedrock.js";
import { BaseBedrockInput } from "../../utils/bedrock/index.js";
import { BedrockChat as BaseBedrockChat } from "./web.js";

export interface BedrockChatFields
Expand Down
Loading
Loading