📦 new: add ollama as model provider#23
Conversation
|
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. |
…features/ollama-provider-integration
Merge conflicts are fixed; now I'm adding the models folder. |
|
All the mentioned changes have been completed, @warengonzaga. |
|
Hey @promiseer, did you add an option to the CLI for which model to use? Do you have a demo? |
|
@warengonzaga here is the demo video ollama.js.-.magic-commit.-.Visual.Studio.Code.2024-10-17.21-16-23.mp4 |
|
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. |
|
You are correct, as users to click each time will lead to a poor experience. |
You can use the package "Conf" to save configuration we can use that to store some data of the user. |
|
What's the update here, @promiseer? Let's add the ability to select a model by defining it as a flag. |
|
Hey, @promiseer, just checking if we can add it to your PR. Otherwise, I will continue it. |
|
Okay I will merge this to the |
This pull request includes changes to the
package.json,source/app.js,source/utils/commit.js,source/utils/config.json, andsource/utils/openai.jsfiles 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.jsandsource/utils/modelSelection.js.Enhancements:
package.json: Improved script condition to handle missing directories.source/app.js: Moved OpenAI configuration toutils/openAI.jsfor 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.