Skip to content

Commit 042e9db

Browse files
authored
Merge pull request #13 from hwchase17/harrison/add_docs
Harrison/add docs
2 parents b4aef9c + 01ebdc3 commit 042e9db

File tree

13 files changed

+178
-1
lines changed

13 files changed

+178
-1
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ self_ask_with_search.run("What is the hometown of the reigning men's U.S. Open c
4444
```
4545

4646
**[LLM Math](https://twitter.com/amasad/status/1568824744367259648?s=20&t=-7wxpXBJinPgDuyHLouP1w)**
47+
4748
To recreate this example, use the following code snippet or check out the [example notebook](examples/llm_math.ipynb).
4849

4950
```

β€Ždocs/Makefileβ€Ž

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SPHINXAUTOBUILD ?= sphinx-autobuild
9+
SOURCEDIR = .
10+
BUILDDIR = _build
11+
12+
# Put it first so that "make" without argument is like "make help".
13+
help:
14+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
15+
16+
.PHONY: help Makefile
17+
18+
# Catch-all target: route all unknown targets to Sphinx using the new
19+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
20+
%: Makefile
21+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

β€Ždocs/conf.pyβ€Ž

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
"""Configuration file for the Sphinx documentation builder."""
2+
# Configuration file for the Sphinx documentation builder.
3+
#
4+
# This file only contains a selection of the most common options. For a full
5+
# list see the documentation:
6+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
7+
8+
# -- Path setup --------------------------------------------------------------
9+
10+
# If extensions (or modules to document with autodoc) are in another directory,
11+
# add these directories to sys.path here. If the directory is relative to the
12+
# documentation root, use os.path.abspath to make it absolute, like shown here.
13+
#
14+
# import os
15+
# import sys
16+
# sys.path.insert(0, os.path.abspath('.'))
17+
18+
import langchain
19+
20+
# -- Project information -----------------------------------------------------
21+
22+
project = "LangChain"
23+
copyright = "2022, Harrison Chase"
24+
author = "Harrison Chase"
25+
26+
version = langchain.__version__
27+
release = langchain.__version__
28+
29+
30+
# -- General configuration ---------------------------------------------------
31+
32+
# Add any Sphinx extension module names here, as strings. They can be
33+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
34+
# ones.
35+
extensions = [
36+
"sphinx.ext.autodoc",
37+
"sphinx.ext.autodoc.typehints",
38+
"sphinx.ext.autosummary",
39+
"sphinx.ext.napoleon",
40+
]
41+
42+
# autodoc_typehints = "signature"
43+
autodoc_typehints = "description"
44+
45+
# Add any paths that contain templates here, relative to this directory.
46+
templates_path = ["_templates"]
47+
48+
# List of patterns, relative to source directory, that match files and
49+
# directories to ignore when looking for source files.
50+
# This pattern also affects html_static_path and html_extra_path.
51+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
52+
53+
54+
# -- Options for HTML output -------------------------------------------------
55+
56+
# The theme to use for HTML and HTML Help pages. See the documentation for
57+
# a list of builtin themes.
58+
#
59+
html_theme = "sphinx_rtd_theme"
60+
# html_theme = "sphinx_typlog_theme"
61+
62+
# Add any paths that contain custom static files (such as style sheets) here,
63+
# relative to this directory. They are copied after the builtin static files,
64+
# so a file named "default.css" will overwrite the builtin "default.css".
65+
html_static_path = ["_static"]

β€Ždocs/index.rstβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Welcome to LangChain
2+
==========================
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
:caption: User API
7+
8+
modules/prompt
9+
modules/llms
10+
modules/chains

β€Ždocs/make.batβ€Ž

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=.
11+
set BUILDDIR=_build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

β€Ždocs/modules/chains.rstβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:mod:`langchain.chains`
2+
=======================
3+
4+
.. automodule:: langchain.chains
5+
:members:
6+
:undoc-members:
7+

β€Ždocs/modules/llms.rstβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
:mod:`langchain.llms`
2+
=======================
3+
4+
.. automodule:: langchain.llms
5+
:members:
6+
:undoc-members:

β€Ždocs/modules/prompt.rstβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
:mod:`langchain.prompt`
2+
=======================
3+
4+
.. automodule:: langchain.prompt
5+
:members:
6+
:undoc-members:

β€Ždocs/requirements.txtβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sphinx==4.5.0
2+
sphinx-autobuild==2021.3.14
3+
sphinx_rtd_theme==1.0.0
4+
sphinx-typlog-theme==0.8.0

β€Žlangchain/VERSIONβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.1

0 commit comments

Comments
Β (0)