Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking β€œSign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add proxy configuration #423

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
Next Next commit
πŸ“ (README.md): update README.md file to include instructions to switc…
…h to different LLM providers and configure additional settings like proxy and CA bundle

πŸ“ (package.json): update devDependencies to include required types packages for follow-redirects, and add dependencies for http-proxy-agent and https-proxy-agent
♻️ (config.ts): refactor config.ts to include new configuration options for HTTP proxy, CA bundle, timeout, verify SSL, client certificate, and API version
πŸš€ (azure.ts): update azure.ts to use the new OpenAI package and pass the HTTP agent to handle proxy settings
♻️ (groq.ts): refactor groq.ts to use OpenAI package instead of the deprecated @azure/openai package
♻️ (openAi.ts): refactor openAi.ts to use OpenAI package instead of the deprecated @azure/openai package, and pass the HTTP agent to handle proxy settings
πŸš€ (set_missing_default_values.ts): add new migration to set missing default values in global config file
♻️ (engine.ts): refactor engine.ts to include API version in the default config object
πŸ”§ (httpAgent.ts): add new httpAgent utility to handle HTTP settings including proxy, CA bundle, timeout, verify SSL, and client certificate
  • Loading branch information
ByJacob committed Oct 17, 2024
commit 3154b85626076994b393727221f6f7ef10d82a14
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -179,7 +179,7 @@ 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.

```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=azure OCO_API_KEY=<your_azure_api_key> OCO_API_URL=<your_azure_endpoint> OCO_API_VERSION=<your_azure_api_version>

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

@@ -227,6 +227,22 @@ oco config set OCO_PROMPT_MODULE=<module>

Replace `<module>` with either `conventional-commit` or `@commitlint`.

### Configure PROXY

**Works only from openAi and azure provider**

```sh
oco config set OCO_HTTP_PROXY=http://127.0.0.1:9090
# or with user na password
oco config set OCO_HTTP_PROXY=http://user:pass@127.0.0.1:9090
```

### Configure extra CA for http agent

```sh
oco config set OCO_HTTP_CA_BUNDLE='/tmp/test.pom,/tmp/test2.pom'
```

#### Example:

To switch to using the `'@commitlint` prompt module, run:
31,326 changes: 13,679 additions & 17,647 deletions out/cli.cjs

Large diffs are not rendered by default.

Loading
Oops, something went wrong.