DEV Community

fadingNA
fadingNA

Posted on

Git Merge

Git Merge

This past weekend, I had to learn how to use another Git command to better manage issue solving. By separating each issue into its own branch, I could work on them individually and then merge the completed work into the main branch using git merge . The first issue involved adding providers, which was an enhancement to allow dynamic selection of providers in the chatminal. This gave users more options when choosing which models to use. The second issue required adding the --stream tag to activate streaming. While streaming provides real-time updates, not everyone prefers it since it’s currently slower than processing prompts in one go due to the additional for loop needed to print each token as it comes in. Once I completed both features, I merged them back into the main branch to keep everything clean and organized.

  • 1. First issue adding providers.

Improve - Dynamic select provider #10

add dyamic provider base on user choose and provide api accordingly.

This issue enhances the chatminal to dynamically select a provider, giving users more flexibility in choosing models. The core improvement is straightforward: I introduced a boolean flag, --provider, allowing users to choose a provider from a list of available options. Once the flag is provided, the system prompts the user to select a provider dynamically. This feature makes the tool more adaptable by supporting multiple model providers, allowing users to customize their experience based on the model best suited for their needs.

  • 2. Second issue adding --stream tag to activate streaming.

Change Streaming using --stream #11

from automatic streaming changin to --stream arguement instead.

Not everyone liking the streaming, for the time processing the streaming still slower than prompt in one time, because it run without a additional for loop to print out each token at the same time.

This issue becomes more complex when combined with --token-usage and different providers, as each provider’s metadata response differs. For now, we are manually handling this variation, but in the future, we’ll work towards dynamically processing and printing token usage metadata for any provider seamlessly.

Conclusion

Over the weekend, I successfully implemented two important enhancements in the chatminal project. First, I added a dynamic provider selection feature, allowing users to choose from multiple model providers, making the tool more flexible. Second, I integrated the --stream tag for real-time token streaming, though it's slower than processing prompts in a single go. The combination of streaming and token usage metadata adds complexity when using different providers, but future improvements will focus on handling this dynamically to streamline the experience across all providers.

Top comments (0)