Fix typo in Prompts Templates Getting Started page (#3514)

`from_templates` -> `from_template`
This commit is contained in:
engkheng 2023-04-26 07:05:13 +08:00 committed by GitHub
parent 9e36d7b82c
commit 5680fb6894
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,7 @@ multiple_input_prompt.format(adjective="funny", content="chickens")
# -> "Tell me a funny joke about chickens." # -> "Tell me a funny joke about chickens."
``` ```
If you do not wish to specify `input_variables` manually, you can also create a `PromptTemplate` using `from_templates` class method. `langchain` will automatically infer the `input_variables` based on the `template` passed. If you do not wish to specify `input_variables` manually, you can also create a `PromptTemplate` using `from_template` class method. `langchain` will automatically infer the `input_variables` based on the `template` passed.
```python ```python
template = "Tell me a {adjective} joke about {content}." template = "Tell me a {adjective} joke about {content}."