Skip to content

Commit

Permalink
add errors to make sure envs set correctly (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahwooders authored Nov 10, 2023
1 parent e0455b7 commit 3b3e8b4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions memgpt/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ def run(
if config.model_endpoint == "azure":
configure_azure_support()

# TODO: remove once model calling logic is cleaner
if memgpt_agent.model != "local":
assert (
os.getenv("OPENAI_API_BASE") is None and os.getenv("BACKEND_TYPE") is None
), f"Please make sure your enviornment variables OPENAI_API_BASE and BACKEND_TYPE are unset"
else:
assert os.getenv("OPENAI_API_BASE") and os.getenv(
"BACKEND_TYPE"
), f"Please make sure your enviornment variables OPENAI_API_BASE and BACKEND_TYPE are set to run a model with a local endpoint"

run_agent_loop(memgpt_agent, first, no_verify, config) # TODO: add back no_verify


Expand Down

0 comments on commit 3b3e8b4

Please sign in to comment.