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

Implement better reprs for Runnables #11175

Merged
merged 12 commits into from
Sep 29, 2023
Merged

Implement better reprs for Runnables #11175

merged 12 commits into from
Sep 29, 2023

Conversation

nfcampos
Copy link
Collaborator

ChatPromptTemplate(messages=[SystemMessagePromptTemplate(prompt=PromptTemplate(input_variables=[], template='You are a nice assistant.')), HumanMessagePromptTemplate(prompt=PromptTemplate(input_variables=['question'], template='{question}'))])
| RunnableLambda(lambda x: x)
| {
    chat: FakeListChatModel(responses=["i'm a chatbot"]),
    llm: FakeListLLM(responses=["i'm a textbot"])
  }

@nfcampos nfcampos requested a review from baskaryan September 28, 2023 14:25
@vercel
Copy link

vercel bot commented Sep 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Sep 29, 2023 10:54am

@dosubot dosubot bot added Ɑ: models Related to LLMs or chat model modules 🤖:improvement Medium size change to existing code to handle new use-cases labels Sep 28, 2023
@@ -2275,6 +2284,7 @@ def _lambda(x: int) -> Union[int, Runnable]:

output = await runnable.with_retry(
stop_after_attempt=2,
wait_exponential_jitter=False,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Speed up tests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

@eyurtsev
Copy link
Collaborator

sorry i'm comically bad with the linters

@nfcampos nfcampos merged commit 61b5942 into master Sep 29, 2023
31 checks passed
@nfcampos nfcampos deleted the nc/runnable-repr branch September 29, 2023 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:improvement Medium size change to existing code to handle new use-cases Ɑ: models Related to LLMs or chat model modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants