Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,25 @@ export OLLAMA_HOST=0.0.0.0

This will make Ollama listen on all interfaces, including IPv6 and IPv4, resolving the connection issue. You can add this line to your shell configuration file (like `.bashrc` or `.zshrc`) to make it persistent across sessions.

### Running locally with llama.cpp

You can run OpenCommit with local models served by [llama.cpp](https://github.com/ggerganov/llama.cpp):

- install and build llama.cpp
- start the server with a GGUF model: `./llama-server -m model.gguf --port 8080`
- run (in your project directory):

```sh
git add <files...>
oco config set OCO_AI_PROVIDER='llamacpp' OCO_API_URL='http://localhost:8080'
```

If the server is running on a different machine, set the URL accordingly:

```sh
oco config set OCO_API_URL='http://192.168.1.10:8080'
```

### Flags

There are multiple optional flags that can be used with the `oco` command:
Expand Down Expand Up @@ -122,7 +141,7 @@ Create a `.env` file and add OpenCommit config variables there like this:

```env
...
OCO_AI_PROVIDER=<openai (default), anthropic, azure, ollama, gemini, flowise, deepseek, aimlapi>
OCO_AI_PROVIDER=<openai (default), anthropic, azure, ollama, llamacpp, gemini, flowise, deepseek, aimlapi>
OCO_API_KEY=<your OpenAI API token> // or other LLM provider API token
OCO_API_URL=<may be used to set proxy path to OpenAI api>
OCO_API_CUSTOM_HEADERS=<JSON string of custom HTTP headers to include in API requests>
Expand Down Expand Up @@ -227,14 +246,16 @@ oco models --provider anthropic

By default OpenCommit uses [OpenAI](https://openai.com).

You could switch to [Azure OpenAI Service](https://learn.microsoft.com/azure/cognitive-services/openai/) or Flowise or Ollama.
You could switch to [Azure OpenAI Service](https://learn.microsoft.com/azure/cognitive-services/openai/) or Flowise or Ollama or llama.cpp.

```sh
oco config set OCO_AI_PROVIDER=azure OCO_API_KEY=<your_azure_api_key> OCO_API_URL=<your_azure_endpoint>

oco config set OCO_AI_PROVIDER=flowise OCO_API_KEY=<your_flowise_api_key> OCO_API_URL=<your_flowise_endpoint>

oco config set OCO_AI_PROVIDER=ollama OCO_API_KEY=<your_ollama_api_key> OCO_API_URL=<your_ollama_endpoint>

oco config set OCO_AI_PROVIDER=llamacpp OCO_API_URL=<your_llamacpp_endpoint>
```

### Use with Proxy
Expand Down
Loading
Loading