mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-03 19:57:51 +00:00
Fix linting on the Quickstart Guide sample codes (#3701)
When copying and pasting the sample code from the Quickstart Guide, lint errors ("missing whitespace around operator") occur."
This commit is contained in:
parent
a46f1d830e
commit
ad4eae7ef0
@ -361,9 +361,9 @@ from langchain.prompts.chat import (
|
|||||||
|
|
||||||
chat = ChatOpenAI(temperature=0)
|
chat = ChatOpenAI(temperature=0)
|
||||||
|
|
||||||
template="You are a helpful assistant that translates {input_language} to {output_language}."
|
template = "You are a helpful assistant that translates {input_language} to {output_language}."
|
||||||
system_message_prompt = SystemMessagePromptTemplate.from_template(template)
|
system_message_prompt = SystemMessagePromptTemplate.from_template(template)
|
||||||
human_template="{text}"
|
human_template = "{text}"
|
||||||
human_message_prompt = HumanMessagePromptTemplate.from_template(human_template)
|
human_message_prompt = HumanMessagePromptTemplate.from_template(human_template)
|
||||||
|
|
||||||
chat_prompt = ChatPromptTemplate.from_messages([system_message_prompt, human_message_prompt])
|
chat_prompt = ChatPromptTemplate.from_messages([system_message_prompt, human_message_prompt])
|
||||||
@ -387,9 +387,9 @@ from langchain.prompts.chat import (
|
|||||||
|
|
||||||
chat = ChatOpenAI(temperature=0)
|
chat = ChatOpenAI(temperature=0)
|
||||||
|
|
||||||
template="You are a helpful assistant that translates {input_language} to {output_language}."
|
template = "You are a helpful assistant that translates {input_language} to {output_language}."
|
||||||
system_message_prompt = SystemMessagePromptTemplate.from_template(template)
|
system_message_prompt = SystemMessagePromptTemplate.from_template(template)
|
||||||
human_template="{text}"
|
human_template = "{text}"
|
||||||
human_message_prompt = HumanMessagePromptTemplate.from_template(human_template)
|
human_message_prompt = HumanMessagePromptTemplate.from_template(human_template)
|
||||||
chat_prompt = ChatPromptTemplate.from_messages([system_message_prompt, human_message_prompt])
|
chat_prompt = ChatPromptTemplate.from_messages([system_message_prompt, human_message_prompt])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user