本页还没有译文
本页 18 段还没译成Español,下面显示的是英文原文。ClickSend integration
还没翻译译自英文(docs.langchain.com)本页 18 段都还没译
ClickSend is a cloud-based communications platform that enables developers to send SMS, Email, Voice, Fax, and Post messages through a unified API.
Overview
Integration details
| Class | Package | Serializable | Python support | Version |
|---|---|---|---|---|
ClickSendTools | @clicksend/langchain-clicksend-mcp | ❌ | ❌ |
Tool features
- SMS Messaging: Send text messages to mobile numbers worldwide
- Email: Send transactional and marketing emails
- Voice: Send automated voice messages and calls
- MCP Integration: Connect via Model Context Protocol for seamless agent integration
Setup
The integration lives in the @clicksend/langchain-clicksend-mcp package.
npm install @clicksend/langchain-clicksend-mcpCredentials
You'll need a ClickSend account with API credentials. Sign up at clicksend.com to get your username and API key.
import dotenv from 'dotenv';
dotenv.config();Instantiation
Initialize ClickSend tools by connecting to the ClickSend MCP server:
import { ClickSendTools } from "@clicksend/langchain-clicksend-mcp";
const tools = await ClickSendTools.fromHTTP({
url: "https://mcp.clicksend.com",
username: process.env.CLICKSEND_USERNAME,
apiKey: process.env.CLICKSEND_API_KEY,
});
console.log(`Loaded ${tools.length} ClickSend tools`);Invocation
Use the tools in your LangChain agent to send communications:
import { ChatOpenAI } from "@langchain/openai";
import { createAgent } from "langchain";
// Create agent with tools
const agent = await createAgent({
model: new ChatOpenAI({
model: "gpt-4o-mini",
temperature: 0
}),
tools,
});
// Use the agent
const result = await agent.invoke({
messages: [
{ role: "user", content: "Send an SMS to +1234567890 saying 'Hello from LangChain!'" },
],
});
console.log(result);API reference
For detailed documentation of all features and configurations, please refer to the API reference.
For more information about ClickSend's services and pricing, visit clicksend.com.
AI 翻译查看英文原文