Skip to content

Commit

Permalink
added more clear warnings for when HOST and HOST_TYPE are not set (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacker authored Oct 30, 2023
1 parent cd22173 commit 9ebe468
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions memgpt/local_llm/chat_completion_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ async def get_chat_completion(
functions,
function_call="auto",
):
if HOST is None:
raise ValueError(f"The OPENAI_API_BASE environment variable is not defined. Please set it in your environment.")
if HOST_TYPE is None:
raise ValueError(f"The BACKEND_TYPE environment variable is not defined. Please set it in your environment.")

if function_call != "auto":
raise ValueError(f"function_call == {function_call} not supported (auto only)")

Expand Down

0 comments on commit 9ebe468

Please sign in to comment.