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

Add an environment variable to hold ollama instance #322

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Zelnes
Copy link

@Zelnes Zelnes commented Apr 16, 2024

…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 😄

…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.
@Zelnes Zelnes changed the title refactor(src/commands/config.ts, src/engine/ollama.ts, src/modules/co… Add an environment variable to hold ollama instance Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant