Skip to content

📦 new: add ollama as model provider#23

Merged
warengonzaga merged 7 commits intowarengonzaga:devfrom
promiseer:features/ollama-provider-integration
Jul 13, 2025
Merged

📦 new: add ollama as model provider#23
warengonzaga merged 7 commits intowarengonzaga:devfrom
promiseer:features/ollama-provider-integration

Conversation

@promiseer
Copy link

This pull request includes changes to the package.json, source/app.js, source/utils/commit.js, source/utils/config.json, and source/utils/openai.js files to enhance code readability, promote a component-based structure, remove unused code, and adhere to the DRY principle.

As suggested, we introduced modifications for the Ollama provider, necessitating substantial changes that I believe are essential. Additionally, we added source/utils/ollama.js and source/utils/modelSelection.js.

Enhancements:

  • package.json: Improved script condition to handle missing directories.
  • source/app.js: Moved OpenAI configuration to utils/openAI.js for better readability; implemented a modal selection component for choosing the provider.
  • source/utils/commit.js: Consolidated all Git-related functions and modules into this file.
  • source/utils/config.json: Enhanced configuration with clearer names and added support for additional models.
  • source/utils/generateCommitMessage.js: Created a separate module for prompt generation based on provider.
  • source/utils/modelSelection.js: Developed a component for provider selection.
  • source/utils/ollama.js: Integrated Ollama configuration and prompt response handling.
  • source/utils/openai.js: Updated existing OpenAI configuration for improved readability.

@warengonzaga, I'm awaiting your code review and would appreciate your feedback to enhance the code.

@warengonzaga
Copy link
Owner

You have some git conflicts @promiseer also I think it's time to make another folder called "models" so we can keep adding supported models for the tool.

@warengonzaga warengonzaga added feature Feature Request (Issue) hacktoberfest-accepted Hacktoberfest (PR) labels Oct 16, 2024
@promiseer
Copy link
Author

promiseer commented Oct 16, 2024

You have some git conflicts @promiseer also I think it's time to make another folder called "models" so we can keep adding supported models for the tool.

Merge conflicts are fixed; now I'm adding the models folder.

@promiseer
Copy link
Author

All the mentioned changes have been completed, @warengonzaga.

@warengonzaga
Copy link
Owner

Hey @promiseer, did you add an option to the CLI for which model to use? Do you have a demo?

@promiseer
Copy link
Author

@warengonzaga here is the demo video

ollama.js.-.magic-commit.-.Visual.Studio.Code.2024-10-17.21-16-23.mp4

@warengonzaga
Copy link
Owner

Interesting, does that mean @promiseer everytime you command "magicc" it will ask for which model? I'm thinking of adding a flag for selecting modal then save the config with "Conf" so that everytime we use "magicc" command it will not ask for model.

@promiseer
Copy link
Author

You are correct, as users to click each time will lead to a poor experience.
let me fix this

@warengonzaga
Copy link
Owner

You are correct, as users to click each time will lead to a poor experience. let me fix this

You can use the package "Conf" to save configuration we can use that to store some data of the user.

@warengonzaga
Copy link
Owner

What's the update here, @promiseer? Let's add the ability to select a model by defining it as a flag.

@warengonzaga warengonzaga changed the title 🚀Features/Ollama Provider Integration 📦 new: add ollama as model provider Oct 19, 2024
@warengonzaga warengonzaga linked an issue Oct 19, 2024 that may be closed by this pull request
@warengonzaga
Copy link
Owner

Hey, @promiseer, just checking if we can add it to your PR. Otherwise, I will continue it.

@warengonzaga
Copy link
Owner

Okay I will merge this to the dev branch and then from there I will fix your update.

@warengonzaga warengonzaga merged commit c133e68 into warengonzaga:dev Jul 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature Request (Issue) hacktoberfest-accepted Hacktoberfest (PR)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add ollama as model provider

2 participants