opencommit icon indicating copy to clipboard operation
opencommit copied to clipboard

Usage and Examples for OCO_OPENAI_BASE_PATH

Open jeromeleong opened this issue 1 year ago • 2 comments
trafficstars

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

jeromeleong avatar Jul 06 '24 08:07 jeromeleong

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

di-sukharev avatar Jul 20 '24 08:07 di-sukharev

@jeromeleong :)

di-sukharev avatar Aug 07 '24 07:08 di-sukharev

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 avatar Aug 20 '24 18:08 di-sukharev

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 avatar Sep 01 '24 15:09 di-sukharev

done

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

run npm i -g opencommit@latest

di-sukharev avatar Sep 06 '24 11:09 di-sukharev