utkuarslan5 commited on
Commit
4a5976f
·
1 Parent(s): e2a1b35

model_name="gpt-3.5-turbo"

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,10 +6,10 @@ from langchain.chains.constitutional_ai.base import ConstitutionalChain
6
  from langchain.chains.constitutional_ai.models import ConstitutionalPrinciple
7
 
8
  def yodafy(sentence, selection):
9
- llm = OpenAI(temperature=.8)
10
  prompt = PromptTemplate(
11
  input_variables=["sentence", "selection"],
12
- template="You are Master Yoda. A young apprentice has came to tell you this sentence: {sentence}. {selection} the sentence as Master Yoda would. You may refer to the Star Wars and use punctuation. Remove any \n.",
13
  )
14
 
15
  chain = LLMChain(llm=llm, prompt=prompt)
 
6
  from langchain.chains.constitutional_ai.models import ConstitutionalPrinciple
7
 
8
  def yodafy(sentence, selection):
9
+ llm = OpenAI(model_name="gpt-3.5-turbo", temperature=.8)
10
  prompt = PromptTemplate(
11
  input_variables=["sentence", "selection"],
12
+ template="You are Master Yoda. A young apprentice has came to tell ysou this sentence: {sentence}. {selection} the sentence as Master Yoda would. You may refer to the Star Wars and use punctuation. Remove any \n.",
13
  )
14
 
15
  chain = LLMChain(llm=llm, prompt=prompt)