From 1f54ec899bbbc3bf1b6e3b40c3887132241fe7bb Mon Sep 17 00:00:00 2001 From: axa99 <47756459+axa99@users.noreply.github.com> Date: Thu, 3 Aug 2023 10:53:31 -0500 Subject: [PATCH] updated interface jupyter notebook explanations (#8689) Updated the documentation in the interface.ipynb to clearly show the _input_ and _output_ types for various components @baskaryan --- .../guides/expression_language/interface.ipynb | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/extras/guides/expression_language/interface.ipynb b/docs/extras/guides/expression_language/interface.ipynb index c30c04151..2bd04374a 100644 --- a/docs/extras/guides/expression_language/interface.ipynb +++ b/docs/extras/guides/expression_language/interface.ipynb @@ -19,9 +19,22 @@ "- `ainvoke`: call the chain on an input async\n", "- `abatch`: call the chain on a list of inputs async\n", "\n", - "The type of the input varies by component. For a prompt it is a dictionary, for a retriever it is a single string, for a model either a single string, a list of chat messages, or a PromptValue.\n", + "The type of the input varies by component:\n", "\n", - "The output type also varies by component. For an LLM it is a string, for a ChatModel it's a ChatMessage, for a prompt it's a PromptValue, for a retriever it's a list of documents.\n", + "| Component | Input Type |\n", + "| --- | --- |\n", + "|Prompt|Dictionary|\n", + "|Retriever|Single string|\n", + "|Model| Single string, list of chat messages or a PromptValue|\n", + "\n", + "The output type also varies by component:\n", + "\n", + "| Component | Output Type |\n", + "| --- | --- |\n", + "| LLM | String |\n", + "| ChatModel | ChatMessage |\n", + "| Prompt | PromptValue |\n", + "| Retriever | List of documents |\n", "\n", "Let's take a look at these methods! To do so, we'll create a super simple PromptTemplate + ChatModel chain." ]