Skip to content

Commit

Permalink
fix circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
PCSwingle committed Apr 5, 2024
1 parent f8a61fd commit 4f42e1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mentat/llm_api_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

from mentat.errors import MentatError, ReturnToUser
from mentat.session_context import SESSION_CONTEXT
from mentat.session_input import collect_user_input
from mentat.utils import mentat_dir_path

TOKEN_COUNT_WARNING = 32000
Expand Down Expand Up @@ -334,6 +333,8 @@ async def initialize_client(self):
try:
self.spice.load_provider(OPEN_AI)
except NoAPIKeyError:
from mentat.session_input import collect_user_input

ctx.stream.send(
"No OpenAI api key detected. To avoid entering your api key on startup, create a .env file in"
" ~/.mentat/.env or in your workspace root.",
Expand Down

0 comments on commit 4f42e1c

Please sign in to comment.