Skip to content

Commit

Permalink
remove custom var name warning that supposedly doesnt let you use {{ …
Browse files Browse the repository at this point in the history
…messages }} inside the summarization instructions
  • Loading branch information
devxpy committed Feb 29, 2024
1 parent 84ce54c commit 6aea87a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions daras_ai_v2/prompt_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ def prompt_vars_widget(*keys: str, variables_key: str = "variables"):
new_state = {}
for name in sorted(template_vars):
if name in st.session_state:
st.write(
f"⚠️ `{name}` is a reserved variable name. If you meant to create a custom variable, please use a different name."
)
continue
var_key = f"__{variables_key}_{name}"
st.session_state.setdefault(var_key, old_state.get(name, ""))
Expand Down

1 comment on commit 6aea87a

@SanderGi
Copy link
Member

@SanderGi SanderGi commented on 6aea87a Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning isn’t supposed to mean you can’t use messages. It’s that messages is a special variable and wont show up as a user variable textbox in the variable widget however the variable widget still incorrectly thinks it should show the variable input and thus renders an empty title with no content underneath which is super confusing

edit: Here’s a screenshot of the confusing “Variables” title:

image

Please sign in to comment.