Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 70 seconds delay before proceeding if using ollama option with no internet #347

Open
hacker-hackman opened this issue May 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@hacker-hackman
Copy link

hacker-hackman commented May 23, 2024

Opencommit Version

3.0.15

Node Version

20.9.0

NPM Version

10.1.0

What OS are you seeing the problem on?

Other Linux Distro

What happened?

This bug happens every time.

Expected Behavior

Generate a commit message instantly if disconnected from internet.

Current Behavior

opencommit waits 70 seconds before generating a commit message if disconnected from internet and using ollama option.

Possible Solution

I think there's an internet connection timeout set. And we need to place ollama execution before this timeout.

Steps to Reproduce

  1. Disable your internet connection
  2. Use my config:
OCO_OPENAI_API_KEY=undefined
OCO_ANTHROPIC_API_KEY=undefined
OCO_TOKENS_MAX_INPUT=undefined
OCO_TOKENS_MAX_OUTPUT=undefined
OCO_OPENAI_BASE_PATH=undefined
OCO_DESCRIPTION=false
OCO_EMOJI=false
OCO_MODEL=undefined
OCO_LANGUAGE=en
OCO_MESSAGE_TEMPLATE_PLACEHOLDER=$msg
OCO_PROMPT_MODULE=conventional-commit
OCO_AI_PROVIDER=ollama
OCO_GITPUSH=false
OCO_ONE_LINE_COMMIT=false
  1. Install ollama and pull mistral model from the library
  2. try to use oco command to make a commit

Relevant log output

No response

@di-sukharev
Copy link
Owner

@hacker-hackman do you want to investigate why and open a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants