Skip to content

Commit

Permalink
blubb
Browse files Browse the repository at this point in the history
  • Loading branch information
SinaRampe committed Jun 19, 2023
1 parent 98881af commit 1398507
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion backend/retrieval_qa_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def run_llm(query: str, chat_history: List[Dict[str, Any]] = []):
)
chat = ChatOpenAI(
temperature=0,
model_name="gpt-4"
model_name="gpt-3.5-turbo"
)

qa = ConversationalRetrievalChain.from_llm(
Expand Down
2 changes: 1 addition & 1 deletion consts.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
INDEX_NAME="multiple-pdf-chatbot"
INDEX_NAME="msfdocs"
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def create_sources_string(source_urls: Set[str]) -> str:
sources_string += f"{i+1}. {source}\n"
return sources_string

st.header("GPT-4 Q&A over multiple pdf files 🤓 📚")
st.header("ChatGPT Q&A over MSF Clinical Guidelines & Essential Drug List")
if (
"chat_answers_history" not in st.session_state
and "user_prompt_history" not in st.session_state
Expand All @@ -26,7 +26,7 @@ def create_sources_string(source_urls: Set[str]) -> str:
st.session_state["chat_history"] = []


prompt = st.text_input("Prompt", placeholder="Enter your message here...") or st.button(
prompt = st.text_area("Prompt", placeholder="Enter your message here...") or st.button(
"Submit"
)

Expand All @@ -49,8 +49,8 @@ def create_sources_string(source_urls: Set[str]) -> str:

if st.session_state["chat_answers_history"]:
for generated_response, user_query in zip(
st.session_state["chat_answers_history"],
st.session_state["user_prompt_history"],
reversed(st.session_state["chat_answers_history"]),
reversed(st.session_state["user_prompt_history"]),
):
message(
user_query,
Expand Down

0 comments on commit 1398507

Please sign in to comment.