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 to core Runnable methods #18804

Closed
1 task done
eyurtsev opened this issue Mar 8, 2024 · 7 comments
Closed
1 task done

Add in code documentation to core Runnable methods #18804

eyurtsev opened this issue Mar 8, 2024 · 7 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 Ɑ: lcel Related to LangChain Expression Language (LCEL) Ɑ: 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

Hi all!

Core Runnable methods are not documented well enough yet. It would be great to have each of the method include a self-contained usage example that folks can use as a reference.

Documenting these methods well will have a fairly high value impact by making is easier for LangChain users to use core LangChain primitives.

Runnable (

class Runnable(Generic[Input, Output], ABC):
):

  • assign
  • with_fallbacks
  • with_retry
  • pick
  • pipe
  • map
  • with_listeners

RunnableSerializable (

class RunnableSerializable(Serializable, Runnable[Input, Output]):
):

  • configurable_fields
  • configurable_alternatives

Acceptance criteria

  • Documentation includes context
  • Documentation includes a self contained example in python (including all imports).
  • Example uses ..code-block: python syntax (see other places in the code as reference).

Please document only on method per PR to make it easy to review and get PRs merged quickly!

@eyurtsev eyurtsev added documentation Improvements or additions to documentation help wanted Good issue for contributors good first issue Good for newcomers Ɑ: lcel Related to LangChain Expression Language (LCEL) 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
@eyurtsev eyurtsev removed the documentation Improvements or additions to documentation label Mar 8, 2024
@liugddx
Copy link
Contributor

liugddx commented Mar 9, 2024

@eyurtsev Hi ,assign to me, thanks~

@eyurtsev
Copy link
Collaborator Author

eyurtsev commented Mar 9, 2024

Claim a method :)

Ideally the or only documents one method -- it's much faster to review and merge

@liugddx
Copy link
Contributor

liugddx commented Mar 10, 2024

assign method.

eyurtsev pushed a commit that referenced this issue Mar 14, 2024
… (docs only) (#18951)

**PR message**: ***Delete this entire checklist*** and replace with
- **Description:** [a description of the change](docs: Add in code
documentation to core Runnable assign method)
    - **Issue:** the issue  #18804
@liugddx
Copy link
Contributor

liugddx commented Mar 15, 2024

with_fallbacks method.

@hrishikeshdkakkad
Copy link

/assign - map

baskaryan pushed a commit that referenced this issue Mar 15, 2024
…d (docs only) (#19104)

- Description: [a description of the change] Add in code documentation
to core Runnable with_fallbacks method (docs only)
- Issue: the issue #18804 
@eyurtsev PTAL
ccurme added a commit that referenced this issue Mar 19, 2024
…thod (docs only) (#19192)

- **Description:** Add in code documentation to core Runnable with_retry
method (docs only)
- **Issue:** #18804 
@baskaryan @eyurtsev PTAL

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
baskaryan added a commit that referenced this issue Mar 25, 2024
- **Issue:**  #18804
-  @eyurtsev @ccurme PTAL

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
eyurtsev pushed a commit that referenced this issue Mar 25, 2024
#19515)

**Description:** Docstring for method with_listerners() of class
Runnable
**Issue:** [Add in code documentation to core Runnable methods
#18804](#18804)
**Dependencies:** None
gkorland pushed a commit to FalkorDB/langchain that referenced this issue Mar 30, 2024
…thod (docs only) (langchain-ai#19192)

- **Description:** Add in code documentation to core Runnable with_retry
method (docs only)
- **Issue:** langchain-ai#18804 
@baskaryan @eyurtsev PTAL

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
gkorland pushed a commit to FalkorDB/langchain that referenced this issue Mar 30, 2024
…hain-ai#19395)

- **Issue:**  langchain-ai#18804
-  @eyurtsev @ccurme PTAL

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
gkorland pushed a commit to FalkorDB/langchain that referenced this issue Mar 30, 2024
langchain-ai#19515)

**Description:** Docstring for method with_listerners() of class
Runnable
**Issue:** [Add in code documentation to core Runnable methods
langchain-ai#18804](langchain-ai#18804)
**Dependencies:** None
gkorland pushed a commit to FalkorDB/langchain that referenced this issue Mar 30, 2024
…igurable_alternatives (langchain-ai#19724)

**Description:** Update to the docstring for class RunnableSerializable,
method configurable_alternatives
**Issue:** [Add in code documentation to core Runnable methods
langchain-ai#18804](langchain-ai#18804)
**Dependencies:** None

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
gkorland pushed a commit to FalkorDB/langchain that referenced this issue Mar 30, 2024
…figurable_fields (langchain-ai#19722)

**Description:** Update to the docstring for class RunnableSerializable,
method configurable_fields
**Issue:** [Add in code documentation to core Runnable methods
langchain-ai#18804](langchain-ai#18804)
**Dependencies:** None

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this issue Mar 30, 2024
…thod (docs only) (langchain-ai#19192)

- **Description:** Add in code documentation to core Runnable with_retry
method (docs only)
- **Issue:** langchain-ai#18804 
@baskaryan @eyurtsev PTAL

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this issue Mar 30, 2024
…hain-ai#19395)

- **Issue:**  langchain-ai#18804
-  @eyurtsev @ccurme PTAL

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this issue Mar 30, 2024
langchain-ai#19515)

**Description:** Docstring for method with_listerners() of class
Runnable
**Issue:** [Add in code documentation to core Runnable methods
langchain-ai#18804](langchain-ai#18804)
**Dependencies:** None
@spike-spiegel-21
Copy link
Contributor

spike-spiegel-21 commented Apr 2, 2024

Hi @eyurtsev @ccurme is this issue still open? All the methods mentioned above have already been documented I guess. If there are some more, please mention them.

Je-Cp pushed a commit to Je-Cp/jcp-langchain that referenced this issue Apr 2, 2024
…igurable_alternatives (#19724)

**Description:** Update to the docstring for class RunnableSerializable,
method configurable_alternatives
**Issue:** [Add in code documentation to core Runnable methods
#18804](langchain-ai/langchain#18804)
**Dependencies:** None

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
Je-Cp pushed a commit to Je-Cp/jcp-langchain that referenced this issue Apr 2, 2024
…figurable_fields (#19722)

**Description:** Update to the docstring for class RunnableSerializable,
method configurable_fields
**Issue:** [Add in code documentation to core Runnable methods
#18804](langchain-ai/langchain#18804)
**Dependencies:** None

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
hinthornw pushed a commit that referenced this issue Apr 26, 2024
… (docs only) (#18951)

**PR message**: ***Delete this entire checklist*** and replace with
- **Description:** [a description of the change](docs: Add in code
documentation to core Runnable assign method)
    - **Issue:** the issue  #18804
hinthornw pushed a commit that referenced this issue Apr 26, 2024
…d (docs only) (#19104)

- Description: [a description of the change] Add in code documentation
to core Runnable with_fallbacks method (docs only)
- Issue: the issue #18804 
@eyurtsev PTAL
hinthornw pushed a commit that referenced this issue Apr 26, 2024
…thod (docs only) (#19192)

- **Description:** Add in code documentation to core Runnable with_retry
method (docs only)
- **Issue:** #18804 
@baskaryan @eyurtsev PTAL

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
hinthornw pushed a commit that referenced this issue Apr 26, 2024
- **Issue:**  #18804
-  @eyurtsev @ccurme PTAL

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
hinthornw pushed a commit that referenced this issue Apr 26, 2024
#19515)

**Description:** Docstring for method with_listerners() of class
Runnable
**Issue:** [Add in code documentation to core Runnable methods
#18804](#18804)
**Dependencies:** None
hinthornw pushed a commit that referenced this issue Apr 26, 2024
…igurable_alternatives (#19724)

**Description:** Update to the docstring for class RunnableSerializable,
method configurable_alternatives
**Issue:** [Add in code documentation to core Runnable methods
#18804](#18804)
**Dependencies:** None

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
hinthornw pushed a commit that referenced this issue Apr 26, 2024
…figurable_fields (#19722)

**Description:** Update to the docstring for class RunnableSerializable,
method configurable_fields
**Issue:** [Add in code documentation to core Runnable methods
#18804](#18804)
**Dependencies:** None

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jul 2, 2024
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2024
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jul 9, 2024
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 Ɑ: lcel Related to LangChain Expression Language (LCEL) Ɑ: Runnables Related to Runnables
Projects
None yet
Development

No branches or pull requests

4 participants