Skip to content

Commit

Permalink
Fix PromptTemplates import. (#604)
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Reini <[email protected]>
  • Loading branch information
DavidKurokawa and joshreini1 authored Dec 1, 2023
1 parent f04d915 commit e82468d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion docs/trulens_eval/langchain_instrumentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"# required imports\n",
"from langchain.chains import LLMChain\n",
"from langchain.llms import OpenAI\n",
"from langchain.prompts.chat import HumanMessagePromptTemplate, ChatPromptTemplate, PromptTemplate\n",
"from langchain.prompts import PromptTemplate\n",
"from langchain.prompts.chat import HumanMessagePromptTemplate, ChatPromptTemplate\n",
"from trulens_eval import TruChain\n",
"\n",
"# typical langchain setup\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"# ! pip install langchain>=0.0.170\n",
"from langchain.chains import LLMChain\n",
"from langchain.llms import VertexAI\n",
"from langchain.prompts.chat import ChatPromptTemplate, PromptTemplate\n",
"from langchain.prompts.chat import HumanMessagePromptTemplate"
"from langchain.prompts import PromptTemplate\n",
"from langchain.prompts.chat import HumanMessagePromptTemplate, ChatPromptTemplate"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
"# ! pip install langchain>=0.0.170\n",
"from langchain.chains import LLMChain\n",
"from langchain.llms import OpenAI\n",
"from langchain.prompts.chat import ChatPromptTemplate, PromptTemplate\n",
"from langchain.prompts.chat import HumanMessagePromptTemplate"
"from langchain.prompts import PromptTemplate\n",
"from langchain.prompts.chat import HumanMessagePromptTemplate, ChatPromptTemplate"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
"# ! pip install langchain>=0.0.170\n",
"from langchain.chains import LLMChain\n",
"from langchain.llms import OpenAI\n",
"from langchain.prompts.chat import ChatPromptTemplate, PromptTemplate\n",
"from langchain.prompts.chat import HumanMessagePromptTemplate"
"from langchain.prompts import PromptTemplate\n",
"from langchain.prompts.chat import HumanMessagePromptTemplate, ChatPromptTemplate"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion trulens_eval/generated_files/all_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
# ! pip install langchain>=0.0.170
from langchain.chains import LLMChain
from langchain.llms import OpenAI
from langchain.prompts import PromptTemplate
from langchain.prompts.chat import ChatPromptTemplate
from langchain.prompts.chat import HumanMessagePromptTemplate
from langchain.prompts.chat import PromptTemplate

# ### Create Simple LLM Application
#
Expand Down
2 changes: 1 addition & 1 deletion trulens_eval/trulens_eval/tru_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ class TruChain(App):
# Code snippet taken from langchain 0.0.281 (API subject to change with new versions)
from langchain.chains import LLMChain
from langchain.llms import OpenAI
from langchain.prompts import PromptTemplate
from langchain.prompts.chat import ChatPromptTemplate
from langchain.prompts.chat import HumanMessagePromptTemplate
from langchain.prompts.chat import PromptTemplate
full_prompt = HumanMessagePromptTemplate(
prompt=PromptTemplate(
Expand Down

0 comments on commit e82468d

Please sign in to comment.