Skip to content

Commit

Permalink
updated interface jupyter notebook explanations (#8689)
Browse files Browse the repository at this point in the history
Updated the documentation in the interface.ipynb to clearly show the
_input_ and _output_ types for various components @baskaryan
  • Loading branch information
axa99 committed Aug 3, 2023
1 parent a137492 commit 1f54ec8
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docs/extras/guides/expression_language/interface.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
Expand Down

0 comments on commit 1f54ec8

Please sign in to comment.