@orizn/langchain
v0.1.1
Published
LangChain.js tools for Orizn Visa API — 39,585 passport-destination pairs in 15 languages
Maintainers
Readme
@orizn/langchain
LangChain.js tools for the Orizn Visa API — check visa requirements for 39,585 passport-destination pairs in 15 languages.
Install
npm install @orizn/langchainQuick start
import { OriznQuickVisaCheckTool, OriznVisaCheckTool } from "@orizn/langchain";
// No API key needed for quick checks
const quick = new OriznQuickVisaCheckTool();
const result = await quick.invoke(
{ passport: "FRA", destination: "JPN" }
);
console.log(result);
// Full details (needs API key)
const full = new OriznVisaCheckTool("your-api-key");
const details = await full.invoke(
{ passport: "FRA", destination: "JPN", lang: "fr" }
);
console.log(details);Use with a LangChain agent
import { ChatOpenAI } from "@langchain/openai";
import { AgentExecutor, createOpenAIFunctionsAgent } from "langchain/agents";
import { OriznQuickVisaCheckTool, OriznVisaCheckTool } from "@orizn/langchain";
const tools = [
new OriznQuickVisaCheckTool(),
new OriznVisaCheckTool("your-api-key"),
];
// Use with your preferred LangChain agent setupAvailable tools
| Tool | Description | API Key |
|------|-------------|---------|
| OriznVisaCheckTool | Full visa details with documents, process & tips | Required |
| OriznQuickVisaCheckTool | Quick yes/no visa check | Not needed |
Links
License
MIT
