HengJay commited on
Commit
33def8d
·
1 Parent(s): 791e37c

Fixed NIM API Key bug.

Browse files
Files changed (1) hide show
  1. SNOMED-CT_Assistant.py +2 -3
SNOMED-CT_Assistant.py CHANGED
@@ -128,7 +128,6 @@ def chat_input(prompt, med_text):
128
  messages=st.session_state.messages,
129
  temperature=0.5)
130
  msg = entity_identification_response.choices[0].message.content
131
- print("NIM output" + msg)
132
  entity_list = json.loads(msg)["identified_entity"]
133
  st.session_state.messages.append({"role": "assistant", "content": msg})
134
  st.chat_message("assistant").write(msg)
@@ -179,8 +178,8 @@ for msg in st.session_state.messages:
179
  st.chat_message(msg["role"]).write(msg["content"])
180
 
181
  if user_input := st.chat_input():
182
- if not openai_api_key:
183
- st.info("Please add your OpenAI API key to continue.")
184
  st.stop()
185
  entity_identification_prompt = generate_entity_identification_prompt(user_input)
186
  chat_input(entity_identification_prompt, user_input)
 
128
  messages=st.session_state.messages,
129
  temperature=0.5)
130
  msg = entity_identification_response.choices[0].message.content
 
131
  entity_list = json.loads(msg)["identified_entity"]
132
  st.session_state.messages.append({"role": "assistant", "content": msg})
133
  st.chat_message("assistant").write(msg)
 
178
  st.chat_message(msg["role"]).write(msg["content"])
179
 
180
  if user_input := st.chat_input():
181
+ if not nvidia_nim_key:
182
+ st.info("Please add your Nvidia NIM API key to continue.")
183
  st.stop()
184
  entity_identification_prompt = generate_entity_identification_prompt(user_input)
185
  chat_input(entity_identification_prompt, user_input)