mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-06 13:33:37 +00:00
langchain hub docs (#704)
Co-authored-by: scadEfUr <123224380+scadEfUr@users.noreply.github.com>
This commit is contained in:
@@ -80,6 +80,20 @@ Currently, the template should be formatted as a Python f-string. We also suppor
|
||||
:::
|
||||
|
||||
|
||||
## Load a prompt template from LangChainHub
|
||||
|
||||
LangChainHub contains a collection of prompts which can be loaded directly via LangChain.
|
||||
|
||||
|
||||
```python
|
||||
from langchain.prompts import load_prompt
|
||||
|
||||
prompt = load_prompt("lc://prompts/conversation/prompt.json")
|
||||
prompt.format(history="", input="What is 1 + 1?")
|
||||
```
|
||||
|
||||
You can read more about LangChainHub and the prompts available with it [here](https://github.com/hwchase17/langchain-hub).
|
||||
|
||||
## Pass few shot examples to a prompt template
|
||||
|
||||
Few shot examples are a set of examples that can be used to help the language model generate a better response.
|
||||
|
Reference in New Issue
Block a user