Umer797 commited on
Commit
01e7eb0
·
verified ·
1 Parent(s): bcedd60

Update llm_node.py

Browse files
Files changed (1) hide show
  1. llm_node.py +10 -0
llm_node.py CHANGED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from langchain.chat_models import ChatOpenAI
2
+ from langchain.prompts import PromptTemplate
3
+ from langchain.chains import LLMChain
4
+ from prompts import PROMPT_TEMPLATE
5
+
6
+ def llm_node():
7
+ llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0)
8
+ prompt = PromptTemplate.from_template(PROMPT_TEMPLATE)
9
+ chain = LLMChain(llm=llm, prompt=prompt)
10
+ return chain