-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potentially misleading system message #206
Comments
This is done in the create_reusable_variables_block function in src/bia_bob/_utilities.py We should exclude "bob" and "open" from available functions, "bia_bob" from available modules. git-bob think about this, how would you implement it? |
This message was generated by git-bob (version: 0.2.6, model: gpt-4o-2024-08-06), an experimental AI-based assistant. It can make mistakes and has limitations. Check its messages carefully. To address the issue, we can modify the def create_reusable_variables_block():
"""Creates a block of text that explains which variables, functions and libraries are
available to be used."""
variables = []
functions = []
modules = []
from ._machinery import Context
import types
# figure out which variables are not private
for key, value in Context.variables.items():
if key.startswith("_"):
continue
if callable(value):
if key not in ["quit", "exit", "get_ipython", "open", "bob"]:
functions.append(key)
continue
if isinstance(value, types.ModuleType):
if key != "bia_bob":
modules.append(key)
continue
if key in ["In", "Out"]:
continue
variables.append(key)
return f"""
The following variables are defined: {",".join([str(v) for v in variables])}
The following functions are defined: {",".join([str(v) for v in functions])}
The following modules or aliases are imported: {",".join([str(v) for v in modules])}
""" |
Great! git-bob implement this! |
Currently, the system message mentiones
bia-bob
andopen
in a prominent place:That might be the reason why these are often proposed. We should remove them from these lists.
The text was updated successfully, but these errors were encountered: