opencommit icon indicating copy to clipboard operation
opencommit copied to clipboard

Add an environment variable to hold ollama instance

Open Zelnes opened this issue 1 year ago • 0 comments
trafficstars

…mmitlint/utils.ts):

  • update hardcoded URLs with configurable OCO_AI_HOST variable
  • add isValidHttpUrl utility function to validate the OCO_AI_HOST value in utils.ts file
  • use getConfig() function from commands/config.ts to access OCO_AI_HOST and other config values
  • update OllamaAi class in engine/ollama.ts to use the new OCO_AI_HOST configuration value.

Why ?

I tried the tool, and wanted to put llama on a personnal server.

I didn't give much time to test it, only generated this commit with the new export OCO_AI_HOST='http://192.168.1.2:11434'.

I'm not a typescript dev, so please be kind :smile:

Zelnes avatar Apr 16 '24 12:04 Zelnes