Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in-code documentation for LangChain Runnables #18803

Open
1 task done
eyurtsev opened this issue Mar 8, 2024 · 6 comments
Open
1 task done

Add in-code documentation for LangChain Runnables #18803

eyurtsev opened this issue Mar 8, 2024 · 6 comments
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder good first issue Good for newcomers help wanted Good issue for contributors Ɑ: Runnables Related to Runnables

Comments

@eyurtsev
Copy link
Collaborator

eyurtsev commented Mar 8, 2024

Privileged issue

  • I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here.

Issue Content

We would love to get help to add in code documentation to LangChain core to better document LCEL primitives:

Here is an example of a documented runnable:
https://api.python.langchain.com/en/latest/runnables/langchain_core.runnables.base.RunnableLambda.html#langchain_core.runnables.base.RunnableLambda

Here is an example of an undocumented runnable (currently many are undocumented): https://api.python.langchain.com/en/latest/runnables/langchain_core.runnables.passthrough.RunnablePick.html

Acceptance Criteria:

  • PR should be as minimal as possible (don't try to document unrelated runnables please!) Keep PR size small to get things merged quicker and avoid merge conflicts.
  • Document the class doc-string:
    • include an overview about what the runnable does
    • include a ...code-block: python that shows a self-contained example of how to use the runnable.
    • the self contained example should include all relevant imports so it can be copy pasted AS is and run

How do i figure out what the runnable does?

  • All runnables have unit tests that show how the runnable can be used! You can locate the unit tests and use them as reference.

Some especially import runnables (note that some of these are base abstractions)

@eyurtsev eyurtsev added help wanted Good issue for contributors good first issue Good for newcomers labels Mar 8, 2024
@dosubot dosubot bot added Ɑ: Runnables Related to Runnables 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder labels Mar 8, 2024
@devesh-2002
Copy link
Contributor

May I take this issue?

@eyurtsev
Copy link
Collaborator Author

eyurtsev commented Mar 8, 2024

Yes! Anyone can sign up. Claim any of the runnables and post it here , so other folks can claim other runnables

@devesh-2002
Copy link
Contributor

I would like to work upon RunnablePick

@aanaseer
Copy link
Contributor

aanaseer commented Mar 8, 2024

I'll take on documenting runnables.passthrough.RunnableAssign.

eyurtsev pushed a commit that referenced this issue Mar 9, 2024
**Description:** Improves the docstring for `RunnableAssign` by
providing a concise description and a self-contained code example.
  **Issue:**  #18803
@aaronjimv
Copy link
Contributor

Hello, I would like to work upon class Context

baskaryan pushed a commit that referenced this issue Mar 17, 2024
- [x] **Docs for `RouterRunnable`**: core: Add docs for `RouterRunnable`

- [x] **Add docs for `RouterRunnable`**:
- **Description:** Add docs for `RouterRunnable`, which was previously
missing documentation
    - **Issue:** #18803 
    - **Dependencies:** N/A
    - **Twitter handle:** None
hwchase17 pushed a commit that referenced this issue Mar 19, 2024
- **Description:** Improves the docstring for `class Context` by
providing an overview and an example.
- **Issue:** #18803
eyurtsev pushed a commit that referenced this issue Mar 20, 2024
**Description:** : Updated the docstring for RunnablePick. Added
Overview and an Example for RunnablePick class.
   **Issue:** : #18803
rahul-trip pushed a commit to daxa-ai/langchain that referenced this issue Mar 27, 2024
- [x] **Docs for `RouterRunnable`**: core: Add docs for `RouterRunnable`

- [x] **Add docs for `RouterRunnable`**:
- **Description:** Add docs for `RouterRunnable`, which was previously
missing documentation
    - **Issue:** langchain-ai#18803 
    - **Dependencies:** N/A
    - **Twitter handle:** None
rahul-trip pushed a commit to daxa-ai/langchain that referenced this issue Mar 27, 2024
- **Description:** Improves the docstring for `class Context` by
providing an overview and an example.
- **Issue:** langchain-ai#18803
rahul-trip pushed a commit to daxa-ai/langchain that referenced this issue Mar 27, 2024
**Description:** : Updated the docstring for RunnablePick. Added
Overview and an Example for RunnablePick class.
   **Issue:** : langchain-ai#18803
bechbd pushed a commit to bechbd/langchain that referenced this issue Mar 29, 2024
**Description:** Improves the docstring for `RunnableAssign` by
providing a concise description and a self-contained code example.
  **Issue:**  langchain-ai#18803
bechbd pushed a commit to bechbd/langchain that referenced this issue Mar 29, 2024
- [x] **Docs for `RouterRunnable`**: core: Add docs for `RouterRunnable`

- [x] **Add docs for `RouterRunnable`**:
- **Description:** Add docs for `RouterRunnable`, which was previously
missing documentation
    - **Issue:** langchain-ai#18803 
    - **Dependencies:** N/A
    - **Twitter handle:** None
bechbd pushed a commit to bechbd/langchain that referenced this issue Mar 29, 2024
- **Description:** Improves the docstring for `class Context` by
providing an overview and an example.
- **Issue:** langchain-ai#18803
bechbd pushed a commit to bechbd/langchain that referenced this issue Mar 29, 2024
**Description:** : Updated the docstring for RunnablePick. Added
Overview and an Example for RunnablePick class.
   **Issue:** : langchain-ai#18803
gkorland pushed a commit to FalkorDB/langchain that referenced this issue Mar 30, 2024
**Description:** Improves the docstring for `RunnableAssign` by
providing a concise description and a self-contained code example.
  **Issue:**  langchain-ai#18803
gkorland pushed a commit to FalkorDB/langchain that referenced this issue Mar 30, 2024
- [x] **Docs for `RouterRunnable`**: core: Add docs for `RouterRunnable`

- [x] **Add docs for `RouterRunnable`**:
- **Description:** Add docs for `RouterRunnable`, which was previously
missing documentation
    - **Issue:** langchain-ai#18803 
    - **Dependencies:** N/A
    - **Twitter handle:** None
gkorland pushed a commit to FalkorDB/langchain that referenced this issue Mar 30, 2024
- **Description:** Improves the docstring for `class Context` by
providing an overview and an example.
- **Issue:** langchain-ai#18803
gkorland pushed a commit to FalkorDB/langchain that referenced this issue Mar 30, 2024
**Description:** : Updated the docstring for RunnablePick. Added
Overview and an Example for RunnablePick class.
   **Issue:** : langchain-ai#18803
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this issue Mar 30, 2024
- **Description:** Improves the docstring for `class Context` by
providing an overview and an example.
- **Issue:** langchain-ai#18803
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this issue Mar 30, 2024
**Description:** : Updated the docstring for RunnablePick. Added
Overview and an Example for RunnablePick class.
   **Issue:** : langchain-ai#18803
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this issue Mar 30, 2024
- **Description:** Improves the docstring for `class Context` by
providing an overview and an example.
- **Issue:** langchain-ai#18803
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this issue Mar 30, 2024
**Description:** : Updated the docstring for RunnablePick. Added
Overview and an Example for RunnablePick class.
   **Issue:** : langchain-ai#18803
@spike-spiegel-21
Copy link
Contributor

I have added docs for RunnableConfigurableFields. Please check my PR @eyurtsev
#19849

ccurme added a commit that referenced this issue Apr 1, 2024
- [x] **docs**: core: Add docs for `RunnableConfigurableFields`

- **Description:** Added incode docs for `RunnableConfigurableFields`
with example
    - **Issue:** #18803 
    - **Dependencies:** NA
    - **Twitter handle:** NA

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
marlenezw pushed a commit to marlenezw/langchain that referenced this issue Apr 2, 2024
- [x] **docs**: core: Add docs for `RunnableConfigurableFields`

- **Description:** Added incode docs for `RunnableConfigurableFields`
with example
    - **Issue:** langchain-ai#18803 
    - **Dependencies:** NA
    - **Twitter handle:** NA

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
hinthornw pushed a commit that referenced this issue Apr 26, 2024
**Description:** Improves the docstring for `RunnableAssign` by
providing a concise description and a self-contained code example.
  **Issue:**  #18803
hinthornw pushed a commit that referenced this issue Apr 26, 2024
- [x] **Docs for `RouterRunnable`**: core: Add docs for `RouterRunnable`

- [x] **Add docs for `RouterRunnable`**:
- **Description:** Add docs for `RouterRunnable`, which was previously
missing documentation
    - **Issue:** #18803 
    - **Dependencies:** N/A
    - **Twitter handle:** None
hinthornw pushed a commit that referenced this issue Apr 26, 2024
- **Description:** Improves the docstring for `class Context` by
providing an overview and an example.
- **Issue:** #18803
hinthornw pushed a commit that referenced this issue Apr 26, 2024
**Description:** : Updated the docstring for RunnablePick. Added
Overview and an Example for RunnablePick class.
   **Issue:** : #18803
hinthornw pushed a commit that referenced this issue Apr 26, 2024
- [x] **docs**: core: Add docs for `RunnableConfigurableFields`

- **Description:** Added incode docs for `RunnableConfigurableFields`
with example
    - **Issue:** #18803 
    - **Dependencies:** NA
    - **Twitter handle:** NA

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder good first issue Good for newcomers help wanted Good issue for contributors Ɑ: Runnables Related to Runnables
Projects
None yet
Development

No branches or pull requests

5 participants