Logo
Explore Help
Sign In
WEBDIENSTE/langgraph
Watch 1
Star 0
Fork 0
mirror of https://github.com/langchain-ai/langgraph.git synced 2026-08-21 15:12:26 +02:00
Code Issues Packages Projects Releases Wiki Activity
Files
f04b2cff5dcb7ea444893151e553606d9ce6d75d
langgraph/examples
T
History
Nuno Campos b90a62a00d Add concept of reserved channels (ie. channels updated by Pregel), Add a reserved channel for is_last_step
2023-11-15 15:16:18 +00:00
..
old
Add recursive web loader example
2023-10-18 18:44:40 +01:00
combine_docs.ipynb
Create a Topic channel, Make LastValue the default channel if not specified, Add default input and output keys
2023-11-04 17:40:12 +00:00
draft-revise-loop.py
Add concept of reserved channels (ie. channels updated by Pregel), Add a reserved channel for is_last_step
2023-11-15 15:16:18 +00:00
rag.py
Add concept of reserved channels (ie. channels updated by Pregel), Add a reserved channel for is_last_step
2023-11-15 15:16:18 +00:00
readme.py
Create a Topic channel, Make LastValue the default channel if not specified, Add default input and output keys
2023-11-04 17:40:12 +00:00
recursive-web-loader.py
Create a Topic channel, Make LastValue the default channel if not specified, Add default input and output keys
2023-11-04 17:40:12 +00:00

readme.py

from permchain import Channel, Pregel

grow_value = (
    Channel.subscribe_to("value")
    | (lambda x: x + x)
    | Channel.write_to(value=lambda x: x if len(x) < 10 else None)
)

app = Pregel(
    chains={"grow_value": grow_value},
    input="value",
    output="value",
)

assert app.invoke("a") == "aaaaaaaa"
Reference in New Issue View Git Blame Copy Permalink
Powered by Gitea Version: 1.27.1 Page: 27ms Template: 3ms
Auto
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API