di-sukharev / opencommit

Generate conventional git commit messages with AI in 1 second 🤯🔫
https://www.npmjs.com/package/opencommit
MIT License
5.89k stars 310 forks source link

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

Closed jeromeleong closed 6 days ago

jeromeleong commented 2 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 1 month ago

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

di-sukharev commented 1 month ago

@jeromeleong :)

di-sukharev commented 3 weeks 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 1 week 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 6 days ago

done

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

run npm i -g opencommit@latest