Skip to content

Commit 8409eac

Browse files
committed
docs: add langchain-integration-health tool documentation
Add comprehensive integration testing and monitoring framework for LangChain. - Follow official LangChain tools template format exactly - Include proper sidebar metadata and structure - Provide CLI and programmatic usage examples - Add integration details table with package info - Apply proper formatting and cell IDs
1 parent 238ecd0 commit 8409eac

File tree

2 files changed

+224
-0
lines changed

2 files changed

+224
-0
lines changed
Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "raw",
5+
"id": "sidebar-label",
6+
"metadata": {},
7+
"source": [
8+
"---\n",
9+
"sidebar_label: LangChain Integration Health\n",
10+
"---"
11+
]
12+
},
13+
{
14+
"cell_type": "markdown",
15+
"id": "main-header",
16+
"metadata": {},
17+
"source": [
18+
"# LangChain Integration Health\n",
19+
"\n",
20+
"This notebook provides a quick overview for getting started with LangChain Integration Health [tool](/docs/integrations/tools/). For detailed documentation of all features and configurations head to the [GitHub repository](https://github.com/sadiqkhzn/langchain-integration-health).\n",
21+
"\n",
22+
"## Overview\n",
23+
"\n",
24+
"### Integration details\n",
25+
"\n",
26+
"| Class | Package | Serializable | JS support | Package latest |\n",
27+
"| :--- | :--- | :---: | :---: | :---: |\n",
28+
"| LangChainIntegrationHealth | [langchain-integration-health](https://pypi.org/project/langchain-integration-health/) | ❌ | ❌ | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-integration-health?style=flat-square&label=%20) |\n",
29+
"\n",
30+
"### Tool features\n",
31+
"\n",
32+
"- Integration compatibility testing framework\n",
33+
"- Real-time dashboard for monitoring LangChain integrations\n",
34+
"- CLI tools for automated testing and reporting\n",
35+
"- MLXPipeline bind_tools fix examples"
36+
]
37+
},
38+
{
39+
"cell_type": "markdown",
40+
"id": "setup-header",
41+
"metadata": {},
42+
"source": [
43+
"## Setup\n",
44+
"\n",
45+
"The integration lives in the `langchain-integration-health` package."
46+
]
47+
},
48+
{
49+
"cell_type": "code",
50+
"execution_count": null,
51+
"id": "install-package",
52+
"metadata": {},
53+
"outputs": [],
54+
"source": [
55+
"%pip install --quiet -U langchain-integration-health"
56+
]
57+
},
58+
{
59+
"cell_type": "markdown",
60+
"id": "credentials-header",
61+
"metadata": {},
62+
"source": [
63+
"### Credentials\n",
64+
"\n",
65+
"Optional: Set API keys for real integration testing (not required for demo mode):"
66+
]
67+
},
68+
{
69+
"cell_type": "code",
70+
"execution_count": null,
71+
"id": "credentials-setup",
72+
"metadata": {},
73+
"outputs": [],
74+
"source": [
75+
"import getpass\n",
76+
"import os\n",
77+
"\n",
78+
"# Optional: API keys for real testing\n",
79+
"# if not os.environ.get(\"OPENAI_API_KEY\"):\n",
80+
"# os.environ[\"OPENAI_API_KEY\"] = getpass.getpass(\"OpenAI API key:\\n\")"
81+
]
82+
},
83+
{
84+
"cell_type": "markdown",
85+
"id": "langsmith-setup",
86+
"metadata": {},
87+
"source": [
88+
"It's also helpful (but not needed) to set up [LangSmith](https://smith.langchain.com/) for best-in-class observability:"
89+
]
90+
},
91+
{
92+
"cell_type": "code",
93+
"execution_count": null,
94+
"id": "langsmith-config",
95+
"metadata": {},
96+
"outputs": [],
97+
"source": [
98+
"# os.environ[\"LANGSMITH_TRACING\"] = \"true\"\n",
99+
"# os.environ[\"LANGSMITH_API_KEY\"] = getpass.getpass()"
100+
]
101+
},
102+
{
103+
"cell_type": "markdown",
104+
"id": "instantiation-header",
105+
"metadata": {},
106+
"source": [
107+
"## Instantiation\n",
108+
"\n",
109+
"Here we show how to use the LangChain Integration Health CLI tools for testing LangChain integrations:"
110+
]
111+
},
112+
{
113+
"cell_type": "code",
114+
"execution_count": null,
115+
"id": "cli-usage",
116+
"metadata": {},
117+
"outputs": [],
118+
"source": [
119+
"# CLI usage examples\n",
120+
"# !langchain-health discover # Discover available integrations\n",
121+
"# !langchain-health test # Run integration tests\n",
122+
"# !langchain-health dashboard # Launch the dashboard\n",
123+
"# !langchain-health report # Generate compatibility report\n",
124+
"\n",
125+
"print(\"LangChain Integration Health CLI available\")"
126+
]
127+
},
128+
{
129+
"cell_type": "markdown",
130+
"id": "invocation-header",
131+
"metadata": {},
132+
"source": [
133+
"## Invocation\n",
134+
"\n",
135+
"### Programmatic usage\n",
136+
"\n",
137+
"Test a specific integration programmatically:"
138+
]
139+
},
140+
{
141+
"cell_type": "code",
142+
"execution_count": null,
143+
"id": "programmatic-usage",
144+
"metadata": {},
145+
"outputs": [],
146+
"source": [
147+
"import asyncio\n",
148+
"from langchain_integration_health.testers import LLMIntegrationTester\n",
149+
"from langchain_integration_health.utils.config import Config\n",
150+
"\n",
151+
"async def test_integration():\n",
152+
" config = Config.from_env()\n",
153+
" \n",
154+
" # Example: Test an integration\n",
155+
" # from langchain_openai import ChatOpenAI\n",
156+
" # tester = LLMIntegrationTester(ChatOpenAI, config.get_integration_config(\"ChatOpenAI\"))\n",
157+
" # result = await tester.run_all_tests()\n",
158+
" # print(f\"Compatibility Score: {result.compatibility_score}\")\n",
159+
" \n",
160+
" print(\"Integration testing framework ready\")\n",
161+
"\n",
162+
"# asyncio.run(test_integration())"
163+
]
164+
},
165+
{
166+
"cell_type": "markdown",
167+
"id": "dashboard-header",
168+
"metadata": {},
169+
"source": [
170+
"### Launch Dashboard\n",
171+
"\n",
172+
"Start the real-time monitoring dashboard:"
173+
]
174+
},
175+
{
176+
"cell_type": "code",
177+
"execution_count": null,
178+
"id": "dashboard-launch",
179+
"metadata": {},
180+
"outputs": [],
181+
"source": [
182+
"# Launch dashboard\n",
183+
"# !streamlit run -m langchain_integration_health.dashboard.app\n",
184+
"\n",
185+
"print(\"Dashboard available at http://localhost:8501\")"
186+
]
187+
},
188+
{
189+
"cell_type": "markdown",
190+
"id": "api-reference-header",
191+
"metadata": {},
192+
"source": [
193+
"## API reference\n",
194+
"\n",
195+
"For detailed documentation of all LangChain Integration Health features and configurations head to the GitHub repository: https://github.com/sadiqkhzn/langchain-integration-health"
196+
]
197+
}
198+
],
199+
"metadata": {
200+
"kernelspec": {
201+
"display_name": "Python 3",
202+
"language": "python",
203+
"name": "python3"
204+
},
205+
"language_info": {
206+
"codemirror_mode": {
207+
"name": "ipython",
208+
"version": 3
209+
},
210+
"file_extension": ".py",
211+
"mimetype": "text/x-python",
212+
"name": "python",
213+
"nbconvert_exporter": "python",
214+
"pygments_lexer": "ipython3",
215+
"version": "3.11.0"
216+
}
217+
},
218+
"nbformat": 4,
219+
"nbformat_minor": 5
220+
}

libs/packages.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,4 +733,8 @@ packages:
733733
- name: langchain-scrapeless
734734
repo: scrapeless-ai/langchain-scrapeless
735735
path: .
736+
- name: langchain-integration-health
737+
name_title: Integration Health Framework
738+
path: .
739+
repo: sadiqkhzn/langchain-integration-health
736740

0 commit comments

Comments
 (0)