tak-bro / aicommit2

A Reactive CLI that generates git commit messages with Ollama, ChatGPT, Gemini, Claude, Mistral and other AI
https://www.npmjs.com/package/aicommit2
MIT License
115 stars 9 forks source link

OpenAI path #26

Closed toropanov closed 6 months ago

toropanov commented 6 months ago

Feature request

I appreciate the effort of extending the aicommit base repository. However, I do have a question.

If I need to not only replace the base URL, but also change the path as well. Like for example - https://hello.com/cats/v1/conversation.. Would it work if I would change OPENAI_URL to hello.com/cats/ ?

I hope I made myself clear.

Why?

Nothing here

Alternatives

-

Additional context

No response

tak-bro commented 6 months ago

@toropanov Thank you for your interest. I update OPENAI config and add OPENAI_PATH option. The fix will be available starting from version v1.7.5. You can set OPENAI_URL, OPENAI_PATH as below.

aicommit2 config set OPENAI_URL="https://hello.com"
aicommit2 config set OPENAI_PATH="/cats/v1/conversation"

It will request to https://hello.com/cats/v1/conversation

Dakai commented 1 month ago

@toropanov Thank you for your interest. I update OPENAI config and add OPENAI_PATH option. The fix will be available starting from version v1.7.5. You can set OPENAI_URL, OPENAI_PATH as below.

aicommit2 config set OPENAI_URL="https://hello.com"
aicommit2 config set OPENAI_PATH="/cats/v1/conversation"

It will request to https://hello.com/cats/v1/conversation

I tried the commands above but received error message, and I think by the current version 2.0.3, the correct commands are:

aicommit2 config set OPENAI.url="url"
aicommit2 config set OPENAI.path="path"
tak-bro commented 1 month ago

@Dakai That's right. Starting with version 2.0.0, the command has changed because it supports individual options for each model. Thank you for sharing!