Skip to content

Commit

Permalink
fix the displaying of any non-string values of variables included in …
Browse files Browse the repository at this point in the history
…the prompt (#18)

Previously, non-string (e.g. numerical) values were breaking the variable values preview feature.
  • Loading branch information
samsucik authored Oct 1, 2024
1 parent 000a824 commit 7df928d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prompterator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def set_up_prompt_vars_area(st_container, error_container):
# create text of used prompt's variables and their values
vars_values = ""
for var in used_vars:
vars_values += var + ":\n " + st.session_state.row.get(var, "none") + "\n"
vars_values += var + ":\n " + str(st.session_state.row.get(var, "none")) + "\n"

st_container.text_area(
label=f"Attributes other than `{c.TEXT_ORIG_COL}` used in the prompt(s)",
Expand Down

0 comments on commit 7df928d

Please sign in to comment.