Compare commits

..

2 Commits

Author SHA1 Message Date
di-sukharev
23a8d76977 build 2024-09-01 18:14:15 +03:00
di-sukharev
4387c12552 feat(config): add OCO_WHY configuration option to enable output of change explanations in commit messages
docs(README): document the new OCO_WHY config option and its usage for outputting reasons for changes
2024-09-01 18:13:58 +03:00
6 changed files with 2694 additions and 7917 deletions

View File

@@ -76,8 +76,7 @@ oco config set OCO_AI_PROVIDER='ollama'
If you want to use a model other than mistral (default), you can do so by setting the `OCO_AI_PROVIDER` environment variable as follows:
```sh
oco config set OCO_AI_PROVIDER='ollama'
oco config set OCO_MODEL='llama3:8b'
oco config set OCO_AI_PROVIDER='ollama/llama3:8b'
```
If you have ollama that is set up in docker/ on another machine with GPUs (not locally), you can change the default endpoint url.
@@ -128,12 +127,12 @@ OCO_TOKENS_MAX_OUTPUT=<max response tokens (default: 500)>
OCO_OPENAI_BASE_PATH=<may be used to set proxy path to OpenAI api>
OCO_DESCRIPTION=<postface a message with ~3 sentences description of the changes>
OCO_EMOJI=<boolean, add GitMoji>
OCO_MODEL=<either 'gpt-4o', 'gpt-4', 'gpt-4-turbo', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview' or 'gpt-4-0125-preview' or any Anthropic or Ollama model or any string basically, but it should be a valid model name>
OCO_MODEL=<either 'gpt-4o', 'gpt-4', 'gpt-4-turbo', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview' or 'gpt-4-0125-preview' or any string basically, but it should be a valid model name>
OCO_LANGUAGE=<locale, scroll to the bottom to see options>
OCO_MESSAGE_TEMPLATE_PLACEHOLDER=<message template placeholder, default: '$msg'>
OCO_PROMPT_MODULE=<either conventional-commit or @commitlint, default: conventional-commit>
OCO_ONE_LINE_COMMIT=<one line commit message, default: false>
OCO_AI_PROVIDER=<openai (default), anthropic, azure, ollama>
OCO_AI_PROVIDER=<openai (default), anthropic, azure, ollama or ollama/model>
...
```

10588
out/cli.cjs

File diff suppressed because one or more lines are too long

View File

@@ -56902,10 +56902,7 @@ var OllamaAi = class {
stream: false
};
try {
const response = await this.client.post(
this.client.getUri(this.config),
params
);
const response = await this.client.post("", params);
const message = response.data.message;
return message?.content;
} catch (err) {

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "opencommit",
"version": "3.1.2",
"version": "3.0.20",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "opencommit",
"version": "3.1.2",
"version": "3.0.20",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.0",

View File

@@ -1,6 +1,6 @@
{
"name": "opencommit",
"version": "3.1.2",
"version": "3.1.0",
"description": "Auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
"keywords": [
"git",

View File

@@ -28,10 +28,7 @@ export class OllamaAi implements AiEngine {
stream: false
};
try {
const response = await this.client.post(
this.client.getUri(this.config),
params
);
const response = await this.client.post('', params);
const message = response.data.message;