Skip to content

Commit e5657ed

Browse files
authored
Harrison/GitHub setup (#2)
* cr * cr * cr * cr
1 parent 46b1485 commit e5657ed

File tree

3 files changed

+163
-30
lines changed

3 files changed

+163
-30
lines changed

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Contributing to LangChain
2+
3+
Hi there! Thank you for even being interested in contributing to LangChain.
4+
As an open source project in a rapidly developing field, we are extremely open
5+
to contributions, whether it be in the form of a new feature, improved infra, or better documentation.
6+
7+
To contribute to this project, please follow a ["fork and pull request"](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow.
8+
Please do not try to push directly to this repo unless you are maintainer.
9+
10+
## πŸ—ΊοΈContributing Guidelines
11+
12+
### 🚩GitHub Issues
13+
14+
Our [issues](https://github.com/hwchase17/langchainjs/issues) page is kept up to date
15+
with bugs, improvements, and feature requests. There is a taxonomy of labels to help
16+
with sorting and discovery of issues of interest. These include:
17+
18+
- prompts: related to prompt tooling/infra.
19+
- llms: related to LLM wrappers/tooling/infra.
20+
- chains
21+
- utilities: related to different types of utilities to integrate with (Python, SQL, etc.).
22+
- agents
23+
- memory
24+
- applications: related to example applications to build
25+
26+
If you start working on an issue, please assign it to yourself.
27+
28+
If you are adding an issue, please try to keep it focused on a single modular bug/improvement/feature.
29+
If the two issues are related, or blocking, please link them rather than keep them as one single one.
30+
31+
We will try to keep these issues as up to date as possible, though
32+
with the rapid rate of develop in this field some may get out of date.
33+
If you notice this happening, please just let us know.
34+
35+
### πŸ™‹Getting Help
36+
37+
Although we try to have a developer setup to make it as easy as possible for others to contribute (see below)
38+
it is possible that some pain point may arise around environment setup, linting, documentation, or other.
39+
Should that occur, please contact a maintainer! Not only do we want to help get you unblocked,
40+
but we also want to make sure that the process is smooth for future contributors.
41+
42+
In a similar vein, we do enforce certain linting, formatting, and documentation standards in the codebase.
43+
If you are finding these difficult (or even just annoying) to work with,
44+
feel free to contact a maintainer for help - we do not want these to get in the way of getting
45+
good code into the codebase.
46+
47+
### 🏭Release process
48+
49+
# TODO:
50+
As of now, LangChain has an ad hoc release process: releases are cut with high frequency via by
51+
a developer and published to [PyPI](https://pypi.org/project/langchain/).
52+
53+
LangChain follows the [semver](https://semver.org/) versioning standard. However, as pre-1.0 software,
54+
even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4).
55+
56+
If your contribution has made its way into a release, we will want to give you credit on Twitter (only if you want though)!
57+
If you have a Twitter account you would like us to mention, please let us know in the PR or in another manner.
58+
59+
## πŸš€Quick Start
60+
61+
# TODO
62+
63+
This project uses [Poetry](https://python-poetry.org/) as a dependency manager. Check out Poetry's [documentation on how to install it](https://python-poetry.org/docs/#installation) on your system before proceeding.
64+
65+
❗Note: If you use `Conda` or `Pyenv` as your environment / package manager, avoid dependency conflicts by doing the following first:
66+
1. *Before installing Poetry*, create and activate a new Conda env (e.g. `conda create -n langchain python=3.9`)
67+
2. Install Poetry (see above)
68+
3. Tell Poetry to use the virtualenv python environment (`poetry config virtualenvs.prefer-active-python true`)
69+
4. Continue with the following steps.
70+
71+
To install requirements:
72+
73+
```bash
74+
poetry install -E all
75+
```
76+
77+
This will install all requirements for running the package, examples, linting, formatting, tests, and coverage. Note the `-E all` flag will install all optional dependencies necessary for integration testing.
78+
79+
Now, you should be able to run the common tasks in the following section.
80+
81+
## βœ…Common Tasks
82+
83+
84+
### Testing: TODO
85+
86+
Unit tests cover modular logic that does not require calls to outside APIs.
87+
88+
To run unit tests:
89+
90+
```bash
91+
make test
92+
```
93+
94+
If you add new logic, please add a unit test.
95+
96+
Integration tests cover logic that requires making calls to outside APIs (often integration with other services).
97+
98+
To run integration tests:
99+
100+
```bash
101+
make integration_tests
102+
```
103+
104+
If you add support for a new external API, please add a new integration test.
105+
106+
107+
## Documentation: TODO
108+
109+
### Contribute Documentation
110+
111+
Docs are largely autogenerated by [sphinx](https://www.sphinx-doc.org/en/master/) from the code.
112+
113+
For that reason, we ask that you add good documentation to all classes and methods.
114+
115+
Similar to linting, we recognize documentation can be annoying. If you do not want to do it, please contact a project maintainer, and they can help you with it. We do not want this to be a blocker for good code getting contributed.
116+
117+
### Build Documentation Locally
118+
119+
Before building the documentation, it is always a good idea to clean the build directory:
120+
121+
```bash
122+
make docs_clean
123+
```
124+
125+
Next, you can run the linkchecker to make sure all links are valid:
126+
127+
```bash
128+
make docs_linkcheck
129+
```
130+
131+
Finally, you can build the documentation as outlined below:
132+
133+
```bash
134+
make docs_build
135+
```

β€ŽLICENSEβ€Ž

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) Harrison Chase
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

β€ŽREADME.mdβ€Ž

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,42 +25,19 @@ create a truly powerful app - the real power comes when you can combine them wit
2525

2626
This library is aimed at assisting in the development of those types of applications.
2727

28-
## πŸ“– Documentation
29-
30-
Documentation for Typescript is still WIP. In the meantime you can see the
31-
full Python documentation [here](https://langchain.readthedocs.io/en/latest/?)
32-
33-
## πŸš€ What can this help with?
34-
35-
There are six main areas that LangChain is designed to help with.
36-
These are, in increasing order of complexity:
37-
38-
**πŸ“ƒ LLMs and Prompts:**
39-
40-
This includes prompt management, prompt optimization, generic interface for all LLMs, and common utilities for working with LLMs.
41-
42-
**πŸ”— Chains:**
28+
## Relationship with Python LangChain
4329

44-
Chains go beyond just a single LLM call, and are sequences of calls (whether to an LLM or a different utility). LangChain provides a standard interface for chains, lots of integrations with other tools, and end-to-end chains for common applications.
30+
This is built to integrate as seamlessly as possible with the [LangChain Python package](https://github.com/hwchase17/langchain). Specifically, this means all objects (prompts, LLMs, chains, etc) are designed in a way where they can be serialized and shared between languages.
4531

46-
**πŸ“š Data Augmented Generation:**
32+
The [LangChainHub](https://github.com/hwchase17/langchain-hub) is a central place for the serialized versions of these prompts, chains, and agents.
4733

48-
Data Augmented Generation involves specific types of chains that first interact with an external datasource to fetch data to use in the generation step. Examples of this include summarization of long pieces of text and question/answering over specific data sources.
49-
50-
**πŸ€– Agents:**
51-
52-
Agents involve an LLM making decisions about which Actions to take, taking that Action, seeing an Observation, and repeating that until done. LangChain provides a standard interface for agents, a selection of agents to choose from, and examples of end to end agents.
53-
54-
**🧠 Memory:**
55-
56-
Memory is the concept of persisting state between calls of a chain/agent. LangChain provides a standard interface for memory, a collection of memory implementations, and examples of chains/agents that use memory.
57-
58-
**🧐 Evaluation:**
34+
## πŸ“– Documentation
5935

60-
[BETA] Generative models are notoriously hard to evaluate with traditional metrics. One new way of evaluating them is using language models themselves to do the evaluation. LangChain provides some prompts/chains for assisting in this.
36+
For full documentation of prompts, chains, agents and more, please see [here](https://hwchase17.github.io/langchainjs/docs/overview).
6137

62-
For more information on these concepts, please see our [full documentation](https://langchain.readthedocs.io/en/latest/?).
6338

6439
## πŸ’ Contributing
6540

6641
As an open source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infra, or better documentation.
42+
43+
Check out [our contributing guidelines](CONTRIBUTING.md) for instructions on how to contribute.

0 commit comments

Comments
Β (0)