You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/cyril/Downloads/cohere-toolkit-main/src/backend/scripts/cli/main.py", line 97, in <module>
start()
File "/Users/cyril/Downloads/cohere-toolkit-main/src/backend/scripts/cli/main.py", line 70, in start
selected_deployments = select_deployments_prompt(all_deployments, secrets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyril/Downloads/cohere-toolkit-main/src/backend/scripts/cli/prompts.py", line 152, in select_deployments_prompt
choices=[deployment.value for deployment in deployments.keys()],
^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'keys'
make[1]: *** [setup] Error 1
make: *** [first-run] Error 2
Fix should be:
def select_deployments_prompt(deployments, _):
print_styled("🚀 Let's set up your model deployments.", bcolors.MAGENTA)
deployments = inquirer.checkbox(
"Select the model deployments you want to set up",
choices=list(deployments.keys()),
default=["Cohere Platform"],
validate=lambda _, x: len(x) > 0,
)
return deployments
and
def deployment_prompt(secrets, configs):
for secret in configs.env_vars():
value = secrets.get(secret)
if not value:
value = inquirer.text(
f"Enter the value for {secret}", validate=lambda _, x: len(x) > 0
)
secrets[secret] = value
in cohere-toolkit-main/src/backend/scripts/cli/prompts.py. Then start() in main.py should be:
def start():
# Set any command args
parser = argparse.ArgumentParser()
args = parser.parse_args()
show_welcome_message()
secrets = dotenv_values()
process_existing_yaml_config(secrets, CONFIG_FILE_PATH, overwrite_config_prompt)
process_existing_yaml_config(secrets, SECRETS_FILE_PATH, overwrite_secrets_prompt)
# SET UP ENVIRONMENT
for _, prompt in PROMPTS.items():
prompt(secrets)
# SET UP TOOLS
for name, configs in TOOLS.items():
tool_prompt(secrets, name, configs)
# SET UP ENVIRONMENT FOR DEPLOYMENTS
# These imports run code that uses settings. Local imports are used so that we can
# validate any existing config file above before using settings.
from backend.config.deployments import (
AVAILABLE_MODEL_DEPLOYMENTS as MANAGED_DEPLOYMENTS_SETUP,
)
all_deployments = {d.name(): d for d in MANAGED_DEPLOYMENTS_SETUP.copy()}
selected_deployments = select_deployments_prompt(all_deployments, secrets)
for deployment in selected_deployments:
deployment_prompt(secrets, all_deployments[deployment])
# REVIEW VARIABLES
variables_to_update = review_variables_prompt(secrets)
update_variable_prompt(secrets, variables_to_update)
# SET UP .ENV FILE
write_env_file(secrets)
# SET UP YAML CONFIG FILES
# Deal with strange edge case where there are preexisting configuration.yaml
# and secrets.yaml FOLDERS presents in the config folder - cause still unclear
delete_config_folders()
write_template_config_files()
write_config_files(secrets)
# WRAP UP
wrap_up(selected_deployments)
# SHOW SOME EXAMPLES
show_examples()
and
def deployment_prompt(secrets, configs):
for secret in configs.env_vars():
value = secrets.get(secret)
if not value:
value = inquirer.text(
f"Enter the value for {secret}", validate=lambda _, x: len(x) > 0
)
secrets[secret] = value
Additional information
No response
The text was updated successfully, but these errors were encountered:
What is the issue?
Newest commit results in error on
make first-run
:Fix should be:
and
in
cohere-toolkit-main/src/backend/scripts/cli/prompts.py
. Thenstart()
inmain.py
should be:and
Additional information
No response
The text was updated successfully, but these errors were encountered: