diff --git a/src/ell/models/ollama.py b/src/ell/models/ollama.py index 87bf47c7..428548ed 100644 --- a/src/ell/models/ollama.py +++ b/src/ell/models/ollama.py @@ -24,7 +24,7 @@ def register(base_url): It logs any errors encountered during the process. """ global client - client = openai.Client(base_url=base_url) + client = openai.Client(base_url=base_url, api_key="ollama") try: response = requests.get(f"{base_url}/../api/tags") diff --git a/src/ell/util/_warnings.py b/src/ell/util/_warnings.py index 6a183e5e..bd933a14 100644 --- a/src/ell/util/_warnings.py +++ b/src/ell/util/_warnings.py @@ -60,8 +60,8 @@ def {fn.__name__}(...): def _autocommit_warning(): - if (config.get_client_for("gpt-4o-mini")[0] is None): - logger.warning(f"{Fore.LIGHTYELLOW_EX}WARNING: Autocommit is enabled but no OpenAI client found for autocommit model 'gpt-4o-mini' (set your OpenAI API key). Commit messages will not be written.{Style.RESET_ALL}") + if (config.get_client_for(config.autocommit_model)[0] is None): + logger.warning(f"{Fore.LIGHTYELLOW_EX}WARNING: Autocommit is enabled but no client found for autocommit model '{config.autocommit_model}'. Commit messages will not be written.{Style.RESET_ALL}") return True return False