Joshua Sundance Bailey commited on
Commit
a1b0a6f
1 Parent(s): 51b9812

refactor chain_type_help

Browse files
AI_CHANGELOG.md CHANGED
@@ -40,4 +40,4 @@ Tue Sep 26 12:56:59 2023 +0000
40
  - The numpy and tornado packages were added to the requirements.txt file. These packages are not directly required by our application but were added to avoid potential vulnerabilities as suggested by Snyk.
41
  ## [Updated token used for code checkout in GitHub workflow](https://github.com/joshuasundance-swca/langchain-streamlit-demo/commit/b0c4e1ca12f86ea6113ee2c86d38c39d3035f395)
42
  Tue Sep 26 08:56:55 2023 -0400
43
- - In the GitHub Actions workflow file 'ai_changelog.yml', the personal access token used for checking out code has been updated. The token has been changed from 'PAT' to 'WORKFLOW_GIT_ACCESS_TOKEN'.
 
40
  - The numpy and tornado packages were added to the requirements.txt file. These packages are not directly required by our application but were added to avoid potential vulnerabilities as suggested by Snyk.
41
  ## [Updated token used for code checkout in GitHub workflow](https://github.com/joshuasundance-swca/langchain-streamlit-demo/commit/b0c4e1ca12f86ea6113ee2c86d38c39d3035f395)
42
  Tue Sep 26 08:56:55 2023 -0400
43
+ - In the GitHub Actions workflow file 'ai_changelog.yml', the personal access token used for checking out code has been updated. The token has been changed from 'PAT' to 'WORKFLOW_GIT_ACCESS_TOKEN'.
langchain-streamlit-demo/app.py CHANGED
@@ -199,20 +199,15 @@ with sidebar:
199
  chain_type_help_root = (
200
  "https://python.langchain.com/docs/modules/chains/document/"
201
  )
202
- chain_type_help_dict = {
203
- chain_type_name: f"{chain_type_help_root}/{chain_type_name}"
204
  for chain_type_name in (
205
  "stuff",
206
  "refine",
207
  "map_reduce",
208
  "map_rerank",
209
  )
210
- }
211
-
212
- chain_type_help = "\n".join(
213
- f"- [{k}]({v})" for k, v in chain_type_help_dict.items()
214
  )
215
-
216
  document_chat_chain_type = st.selectbox(
217
  label="Document Chat Chain Type",
218
  options=["stuff", "refine", "map_reduce", "map_rerank"],
 
199
  chain_type_help_root = (
200
  "https://python.langchain.com/docs/modules/chains/document/"
201
  )
202
+ chain_type_help = "\n".join(
203
+ f"- [{chain_type_name}]({chain_type_help_root}/{chain_type_name})"
204
  for chain_type_name in (
205
  "stuff",
206
  "refine",
207
  "map_reduce",
208
  "map_rerank",
209
  )
 
 
 
 
210
  )
 
211
  document_chat_chain_type = st.selectbox(
212
  label="Document Chat Chain Type",
213
  options=["stuff", "refine", "map_reduce", "map_rerank"],