di-sukharev / opencommit

just a GPT wrapper for git — generate commit messages by an LLM in 1 sec — works best with Claude 3.5 — supports local models too
https://www.npmjs.com/package/opencommit
MIT License
6.19k stars 331 forks source link

Refactor OCO_BASE_PATHs configs and others to be a single config OCO_API_URL #358

Closed jeromeleong closed 2 months ago

jeromeleong commented 5 months ago

Description

While setting up OpenCommit, I'm experiencing issues with the OCO_OPENAI_BASE_PATH configuration. I've set it to https://api.xxx.xxx/v1/ and provided the API key, but it's not working as expected.

Suggested Solution

Can you provide some specific examples of how to correctly use OCO_OPENAI_BASE_PATH, especially when using a custom API endpoint? Are there any additional steps or configurations needed when using a custom API endpoint instead of the default OpenAI one?

Alternatives

No response

Additional Context

No response

di-sukharev commented 4 months ago

lets start with what do you mean by not working as expected?

di-sukharev commented 3 months ago

@jeromeleong :)

di-sukharev commented 3 months ago

we need to make OCO_OPENAI_BASE_PATH and OCO_FLOWISE_API_URL and all variables solving the same thing (path to an endpoint) — be one variable OCO_API_URL

if smdb introduces a PR before me — please refer to this ticket and add a README docs on how to use the OCO_API_URL. It's used on Flowise and Ollama engines, and also in openAi engine and Azure too

di-sukharev commented 3 months ago

there are now many similar configs which should be refactored to a single one, e.g.: OCO_OPENAI_BASE_PATH OCO_GEMINI_BASE_PATH OCO_API_URL OCO_OLLAMA_API_URL OCO_FLOWISE_ENDPOINT

they should all be a single config key, we'll keep the OCO_API_URL instead of all the others. I'm renaming the ticket to serve this purpose. We will also add docs to readme. @matscube wdyt?

di-sukharev commented 2 months ago

done

update the latest version just merged https://github.com/di-sukharev/opencommit/pull/412

run npm i -g opencommit@latest