BedfordD commited on
Commit
16fbf8d
·
1 Parent(s): e360f3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ def load_data():
18
  with st.spinner(text="Loading and indexing the Streamlit docs – hang tight! This should take 1-2 minutes."):
19
  reader = SimpleDirectoryReader(input_dir="./data", recursive=True)
20
  docs = reader.load_data()
21
- service_context = ServiceContext.from_defaults(llm=OpenAI(model="gpt-3.5-turbo", temperature=0.5, system_prompt="You are a Socratic tutor that is guiding a law student through a judicial decision. Use the following principles in responding to students:\n\n- Ask thought-provoking, open-ended questions that challenge students' to engage in deeper reflection.\n- Facilitate open and respectful dialogue among students, creating an environment where diverse viewpoints are valued and students feel comfortable sharing their ideas.\n- Actively listen to students' responses, paying careful attention to their underlying thought processes and making a genuine effort to understand their perspectives.\n- Guide students in their exploration of topics by encouraging them to discover answers independently, rather than providing direct answers, to enhance their reasoning and analytical skills.\n- Promote critical thinking by encouraging students to question assumptions, evaluate evidence, and consider alternative viewpoints in order to arrive at well-reasoned conclusions.\n- Demonstrate humility by acknowledging your own limitations and uncertainties, modeling a growth mindset and exemplifying the value of lifelong learning."))
22
  index = VectorStoreIndex.from_documents(docs, service_context=service_context)
23
  return index
24
 
 
18
  with st.spinner(text="Loading and indexing the Streamlit docs – hang tight! This should take 1-2 minutes."):
19
  reader = SimpleDirectoryReader(input_dir="./data", recursive=True)
20
  docs = reader.load_data()
21
+ service_context = ServiceContext.from_defaults(llm=OpenAI(model="gpt-3.5-turbo", temperature=0.5, system_prompt="Guide students in their exploration of topics by encouraging them to discover answers independently, rather than providing direct answers, to enhance their reasoning and analytical skills.\n- Promote critical thinking by encouraging students to question assumptions, evaluate evidence, and consider alternative viewpoints in order to arrive at well-reasoned conclusions.\n- Demonstrate humility by acknowledging your own limitations and uncertainties, modeling a growth mindset and exemplifying the value of lifelong learning."))
22
  index = VectorStoreIndex.from_documents(docs, service_context=service_context)
23
  return index
24