Skip to content

Commit 697fc2a

Browse files
committed
Update remaining snippets
1 parent 0cc9f7f commit 697fc2a

77 files changed

Lines changed: 650 additions & 148 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ clean:
7070
broken-links: build
7171
@echo "Checking for broken links..."
7272
@command -v mint >/dev/null 2>&1 || { echo "Error: mint is not installed. Run 'npm install -g mint@4.2.126'"; exit 1; }
73-
@cd build && output=$$(mint broken-links) && echo "$$output" && echo "$$output" | grep -q "found [1-9][0-9]\|[1-9][0-9][0-9] broken links in" && { echo "❌ More than 10 broken links detected!"; exit 1; } || echo "✅ Broken links check passed (≤10 broken links)"
73+
@cd build && output=$$(mint broken-links) && echo "$$output" && count=$$(echo "$$output" | sed -n 's/.*found \([0-9][0-9]*\) broken links.*/\1/p'); if [ -n "$$count" ] && [ "$$count" -gt 5 ]; then echo "❌ More than 5 broken links detected!"; exit 1; else echo "✅ Broken links check passed (≤5 broken links)"; fi
7474

7575
check-pnpm:
7676
@command -v pnpm >/dev/null 2>&1 || { echo >&2 "pnpm is not installed. Please install pnpm to proceed (https://pnpm.io/installation)"; exit 1; }

src/langsmith/application-structure.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ title: Application structure
33
sidebarTitle: Application structure
44
---
55

6-
import FrameworkAgnostic from '/snippets/langsmith/framework-agnostic.mdx';
6+
import FrameworkAgnosticPy from '/snippets/langsmith/framework-agnostic-py.mdx';
7+
import FrameworkAgnosticJS from '/snippets/langsmith/framework-agnostic-js.mdx';
78

89
To deploy on LangSmith, an application must consist of one or more graphs, a configuration file (`langgraph.json`), a file that specifies dependencies, and an optional `.env` file that specifies environment variables.
910

@@ -20,7 +21,12 @@ To deploy using LangSmith, provide the following information:
2021

2122
<Tip>
2223
**Framework agnostic**
23-
<FrameworkAgnostic/>
24+
:::python
25+
<FrameworkAgnosticPy/>
26+
:::
27+
:::js
28+
<FrameworkAgnosticJS/>
29+
:::
2430
</Tip>
2531

2632
## File Structure

src/langsmith/setup-app-requirements-txt.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ title: How to set up an application with requirements.txt
33
sidebarTitle: With requirements.txt
44
---
55

6-
import FrameworkAgnostic from '/snippets/langsmith/framework-agnostic.mdx';
6+
import FrameworkAgnosticPy from '/snippets/langsmith/framework-agnostic-py.mdx';
7+
import FrameworkAgnosticJS from '/snippets/langsmith/framework-agnostic-js.mdx';
78

89
An application must be configured with a [configuration file](/langsmith/cli#configuration-file) in order to be deployed to LangSmith (or to be self-hosted). This how-to guide discusses the basic steps to set up an application for deployment using `requirements.txt` to specify project dependencies.
910

@@ -27,7 +28,12 @@ my-app/
2728
```
2829

2930
<Tip>
30-
<FrameworkAgnostic/>
31+
:::python
32+
<FrameworkAgnosticPy/>
33+
:::
34+
:::js
35+
<FrameworkAgnosticJS/>
36+
:::
3137
</Tip>
3238

3339
You can also set up with:

src/langsmith/setup-javascript.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ title: How to set up a JavaScript application
33
sidebarTitle: Set up a JavaScript application
44
---
55

6-
import FrameworkAgnostic from '/snippets/langsmith/framework-agnostic.mdx';
6+
import FrameworkAgnosticPy from '/snippets/langsmith/framework-agnostic-py.mdx';
7+
import FrameworkAgnosticJS from '/snippets/langsmith/framework-agnostic-js.mdx';
78

89
An application must be configured with a [configuration file](/langsmith/cli#configuration-file) in order to be deployed to LangSmith (or to be self-hosted). This how-to guide discusses the basic steps to set up a JavaScript application for deployment using `package.json` to specify project dependencies.
910

@@ -25,7 +26,12 @@ my-app/
2526
```
2627

2728
<Tip>
28-
<FrameworkAgnostic/>
29+
:::python
30+
<FrameworkAgnosticPy/>
31+
:::
32+
:::js
33+
<FrameworkAgnosticJS/>
34+
:::
2935
</Tip>
3036

3137
After each step, an example file directory is provided to demonstrate how code can be organized.

src/langsmith/setup-pyproject.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ title: How to set up an application with pyproject.toml
33
sidebarTitle: With pyproject.toml
44
---
55

6-
import FrameworkAgnostic from '/snippets/langsmith/framework-agnostic.mdx';
6+
import FrameworkAgnosticPy from '/snippets/langsmith/framework-agnostic-py.mdx';
7+
import FrameworkAgnosticJS from '/snippets/langsmith/framework-agnostic-js.mdx';
78

89
An application must be configured with a [configuration file](/langsmith/cli#configuration-file) in order to be deployed to LangSmith (or to be self-hosted). This how-to guide discusses the basic steps to set up an application for deployment using `pyproject.toml` to define your package's dependencies.
910

@@ -26,7 +27,12 @@ my-app/
2627
└── pyproject.toml # dependencies for your project
2728
```
2829
<Tip>
29-
<FrameworkAgnostic/>
30+
:::python
31+
<FrameworkAgnosticPy/>
32+
:::
33+
:::js
34+
<FrameworkAgnosticJS/>
35+
:::
3036
</Tip>
3137

3238
You can also set up with:

src/oss/concepts/context.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ title: Context overview
33
sidebarTitle: Context
44
---
55

6-
import AlphaCallout from '/snippets/alpha-lg-callout.mdx';
6+
import AlphaCalloutPy from '/snippets/alpha-lg-callout-py.mdx';
7+
import AlphaCalloutJS from '/snippets/alpha-lg-callout-js.mdx';
78

8-
<AlphaCallout />
9+
:::python
10+
<AlphaCalloutPy />
11+
:::
12+
:::js
13+
<AlphaCalloutJS />
14+
:::
915

1016
**Context engineering** is the practice of building dynamic systems that provide the right information and tools, in the right format, so that an AI application can accomplish a task. Context can be characterized along two key dimensions:
1117

src/oss/concepts/memory.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ title: Memory overview
33
sidebarTitle: Memory
44
---
55

6-
import AlphaCallout from '/snippets/alpha-lg-callout.mdx';
6+
import AlphaCalloutPy from '/snippets/alpha-lg-callout-py.mdx';
7+
import AlphaCalloutJS from '/snippets/alpha-lg-callout-js.mdx';
78

8-
<AlphaCallout />
9+
:::python
10+
<AlphaCalloutPy />
11+
:::
12+
:::js
13+
<AlphaCalloutJS />
14+
:::
915

1016
[Memory](/oss/langgraph/add-memory) is a system that remembers information about previous interactions. For AI agents, memory is crucial because it lets them remember previous interactions, learn from feedback, and adapt to user preferences. As agents tackle more complex tasks with numerous user interactions, this capability becomes essential for both efficiency and user satisfaction.
1117

src/oss/javascript/releases/langchain-v1.mdx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ title: What's new in v1
33
sidebarTitle: Release notes
44
---
55

6-
import AlphaCallout from '/snippets/alpha-lc-callout.mdx';
6+
import AlphaCalloutPy from '/snippets/alpha-lc-callout-py.mdx';
7+
import AlphaCalloutJS from '/snippets/alpha-lc-callout-js.mdx';
78

8-
<AlphaCallout />
9+
:::python
10+
<AlphaCalloutPy />
11+
:::
12+
:::js
13+
<AlphaCalloutJS />
14+
:::
915

1016
**LangChain v1 is a focused, production-ready foundation for building agents.** We've streamlined the framework around three core improvements:
1117

@@ -38,7 +44,7 @@ bun add langchain@next @langchain/core@next
3844
```
3945
</CodeGroup>
4046

41-
For a complete list of changes, see the [migration guide](/oss/langchain/middleware#built-in-middleware/migrate/langchain-v1).
47+
For a complete list of changes, see the [migration guide](/oss/migrate/langchain-v1).
4248

4349
## `createAgent`
4450

src/oss/langchain/agents.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
title: Agents
33
---
44

5-
import AlphaCallout from '/snippets/alpha-lc-callout.mdx';
5+
import AlphaCalloutPy from '/snippets/alpha-lc-callout-py.mdx';
6+
import AlphaCalloutJS from '/snippets/alpha-lc-callout-js.mdx';
67

7-
<AlphaCallout />
8+
:::python
9+
<AlphaCalloutPy />
10+
:::
11+
:::js
12+
<AlphaCalloutJS />
13+
:::
814

915
Agents combine language models with tools to create systems that can reason about tasks, decide which tools to use, and iteratively work towards solutions.
1016

src/oss/langchain/context-engineering.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ title: Context engineering in agents
33
sidebarTitle: Context engineering
44
---
55

6-
import AlphaCallout from '/snippets/alpha-lc-callout.mdx';
6+
import AlphaCalloutPy from '/snippets/alpha-lc-callout-py.mdx';
7+
import AlphaCalloutJS from '/snippets/alpha-lc-callout-js.mdx';
78

8-
<AlphaCallout />
9+
:::python
10+
<AlphaCalloutPy />
11+
:::
12+
:::js
13+
<AlphaCalloutJS />
14+
:::
915

1016
The hard part of building agents (or any LLM application) is making them reliable enough.
1117
While they may work for a prototype, they often mess up in more real world and widespread use cases.

0 commit comments

Comments
 (0)