Skip to content

Commit ebcbe80

Browse files
authored
Merge branch 'master' into master
2 parents da8df31 + 9de0892 commit ebcbe80

File tree

1,047 files changed

+38377
-21892
lines changed

Some content is hidden

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

1,047 files changed

+38377
-21892
lines changed

β€Ž.devcontainer/README.mdβ€Ž

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,31 @@ This project includes a [dev container](https://containers.dev/), which lets you
55
You can use the dev container configuration in this folder to build and run the app without needing to install any of its tools locally! You can use it in [GitHub Codespaces](https://github.com/features/codespaces) or the [VS Code Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
66

77
## GitHub Codespaces
8+
89
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/langchain-ai/langchain)
910

1011
You may use the button above, or follow these steps to open this repo in a Codespace:
11-
1. Click the **Code** drop-down menu at the top of https://github.com/langchain-ai/langchain.
12+
13+
1. Click the **Code** drop-down menu at the top of <https://github.com/langchain-ai/langchain>.
1214
1. Click on the **Codespaces** tab.
1315
1. Click **Create codespace on master**.
1416

1517
For more info, check out the [GitHub documentation](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace#creating-a-codespace).
1618

1719
## VS Code Dev Containers
20+
1821
[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/langchain-ai/langchain)
1922

20-
Note: If you click the link above you will open the main repo (langchain-ai/langchain) and not your local cloned repo. This is fine if you only want to run and test the library, but if you want to contribute you can use the link below and replace with your username and cloned repo name:
21-
```
22-
https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/<yourusername>/<yourclonedreponame>
23+
> [!NOTE]
24+
> If you click the link above you will open the main repo (`langchain-ai/langchain`) and *not* your local cloned repo. This is fine if you only want to run and test the library, but if you want to contribute you can use the link below and replace with your username and cloned repo name:
2325
26+
```txt
27+
https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/&lt;YOUR_USERNAME&gt;/&lt;YOUR_CLONED_REPO_NAME&gt;
2428
```
29+
2530
Then you will have a local cloned repo where you can contribute and then create pull requests.
2631

27-
If you already have VS Code and Docker installed, you can use the button above to get started. This will cause VS Code to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.
32+
If you already have VS Code and Docker installed, you can use the button above to get started. This will use VSCode to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.
2833

2934
Alternatively you can also follow these steps to open this repo in a container using the VS Code Dev Containers extension:
3035

@@ -40,5 +45,5 @@ You can learn more in the [Dev Containers documentation](https://code.visualstud
4045

4146
## Tips and tricks
4247

43-
* If you are working with the same repository folder in a container and Windows, you'll want consistent line endings (otherwise you may see hundreds of changes in the SCM view). The `.gitattributes` file in the root of this repo will disable line ending conversion and should prevent this. See [tips and tricks](https://code.visualstudio.com/docs/devcontainers/tips-and-tricks#_resolving-git-line-ending-issues-in-containers-resulting-in-many-modified-files) for more info.
44-
* If you'd like to review the contents of the image used in this dev container, you can check it out in the [devcontainers/images](https://github.com/devcontainers/images/tree/main/src/python) repo.
48+
- If you are working with the same repository folder in a container and Windows, you'll want consistent line endings (otherwise you may see hundreds of changes in the SCM view). The `.gitattributes` file in the root of this repo will disable line ending conversion and should prevent this. See [tips and tricks](https://code.visualstudio.com/docs/devcontainers/tips-and-tricks#_resolving-git-line-ending-issues-in-containers-resulting-in-many-modified-files) for more info.
49+
- If you'd like to review the contents of the image used in this dev container, you can check it out in the [devcontainers/images](https://github.com/devcontainers/images/tree/main/src/python) repo.
Lines changed: 54 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,58 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
33
{
4-
// Name for the dev container
5-
"name": "langchain",
6-
7-
// Point to a Docker Compose file
8-
"dockerComposeFile": "./docker-compose.yaml",
9-
10-
// Required when using Docker Compose. The name of the service to connect to once running
11-
"service": "langchain",
12-
13-
// The optional 'workspaceFolder' property is the path VS Code should open by default when
14-
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
15-
"workspaceFolder": "/workspaces/langchain",
16-
17-
// Prevent the container from shutting down
18-
"overrideCommand": true
19-
20-
// Features to add to the dev container. More info: https://containers.dev/features
21-
// "features": {
22-
// "ghcr.io/devcontainers-contrib/features/poetry:2": {}
23-
// }
24-
25-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
26-
// "forwardPorts": [],
27-
28-
// Uncomment the next line to run commands after the container is created.
29-
// "postCreateCommand": "cat /etc/os-release",
30-
31-
// Configure tool-specific properties.
32-
// "customizations": {},
33-
34-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
35-
// "remoteUser": "root"
4+
// Name for the dev container
5+
"name": "langchain",
6+
// Point to a Docker Compose file
7+
"dockerComposeFile": "./docker-compose.yaml",
8+
// Required when using Docker Compose. The name of the service to connect to once running
9+
"service": "langchain",
10+
// The optional 'workspaceFolder' property is the path VS Code should open by default when
11+
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
12+
"workspaceFolder": "/workspaces/langchain",
13+
"mounts": [
14+
"source=langchain-workspaces,target=/workspaces/langchain,type=volume"
15+
],
16+
// Prevent the container from shutting down
17+
"overrideCommand": true,
18+
// Features to add to the dev container. More info: https://containers.dev/features
19+
"features": {
20+
"ghcr.io/devcontainers/features/git:1": {},
21+
"ghcr.io/devcontainers/features/github-cli:1": {}
22+
},
23+
"containerEnv": {
24+
"UV_LINK_MODE": "copy"
25+
},
26+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
27+
// "forwardPorts": [],
28+
// Run commands after the container is created
29+
"postCreateCommand": "uv sync && echo 'LangChain (Python) dev environment ready!'",
30+
// Configure tool-specific properties.
31+
"customizations": {
32+
"vscode": {
33+
"extensions": [
34+
"ms-python.python",
35+
"ms-python.debugpy",
36+
"ms-python.mypy-type-checker",
37+
"ms-python.isort",
38+
"unifiedjs.vscode-mdx",
39+
"davidanson.vscode-markdownlint",
40+
"ms-toolsai.jupyter",
41+
"GitHub.copilot",
42+
"GitHub.copilot-chat"
43+
],
44+
"settings": {
45+
"python.defaultInterpreterPath": ".venv/bin/python",
46+
"python.formatting.provider": "none",
47+
"[python]": {
48+
"editor.formatOnSave": true,
49+
"editor.codeActionsOnSave": {
50+
"source.organizeImports": true
51+
}
52+
}
53+
}
54+
}
55+
}
56+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
57+
// "remoteUser": "root"
3658
}

β€Ž.devcontainer/docker-compose.yamlβ€Ž

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,9 @@ services:
44
build:
55
dockerfile: libs/langchain/dev.Dockerfile
66
context: ..
7-
volumes:
8-
# Update this to wherever you want VS Code to mount the folder of your project
9-
- ..:/workspaces/langchain:cached
7+
108
networks:
119
- langchain-network
12-
# environment:
13-
# MONGO_ROOT_USERNAME: root
14-
# MONGO_ROOT_PASSWORD: example123
15-
# depends_on:
16-
# - mongo
17-
# mongo:
18-
# image: mongo
19-
# restart: unless-stopped
20-
# environment:
21-
# MONGO_INITDB_ROOT_USERNAME: root
22-
# MONGO_INITDB_ROOT_PASSWORD: example123
23-
# ports:
24-
# - "27017:27017"
25-
# networks:
26-
# - langchain-network
2710

2811
networks:
2912
langchain-network:

β€Ž.editorconfigβ€Ž

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# All files
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
# Python files
12+
[*.py]
13+
indent_style = space
14+
indent_size = 4
15+
max_line_length = 88
16+
17+
# JSON files
18+
[*.json]
19+
indent_style = space
20+
indent_size = 2
21+
22+
# YAML files
23+
[*.{yml,yaml}]
24+
indent_style = space
25+
indent_size = 2
26+
27+
# Markdown files
28+
[*.md]
29+
indent_style = space
30+
indent_size = 2
31+
trim_trailing_whitespace = false
32+
33+
# Configuration files
34+
[*.{toml,ini,cfg}]
35+
indent_style = space
36+
indent_size = 4
37+
38+
# Shell scripts
39+
[*.sh]
40+
indent_style = space
41+
indent_size = 2
42+
43+
# Makefile
44+
[Makefile]
45+
indent_style = tab
46+
indent_size = 4
47+
48+
# Jupyter notebooks
49+
[*.ipynb]
50+
# Jupyter may include trailing whitespace in cell
51+
# outputs that's semantically meaningful
52+
trim_trailing_whitespace = false

β€Ž.github/CONTRIBUTING.mdβ€Ž

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
Hi there! Thank you for even being interested in contributing to LangChain.
44
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether they involve new features, improved infrastructure, better documentation, or bug fixes.
55

6-
To learn how to contribute to LangChain, please follow the [contribution guide here](https://python.langchain.com/docs/contributing/).
6+
To learn how to contribute to LangChain, please follow the [contribution guide here](https://python.langchain.com/docs/contributing/).
7+
8+
## New features
9+
10+
For new features, please start a new [discussion](https://forum.langchain.com/), where the maintainers will help with scoping out the necessary changes.

β€Ž.github/DISCUSSION_TEMPLATE/ideas.ymlβ€Ž

Lines changed: 0 additions & 38 deletions
This file was deleted.

β€Ž.github/DISCUSSION_TEMPLATE/q-a.ymlβ€Ž

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
Β (0)