Introduction
This week we were tasked with addition of 2 new features following by first git merge
to our projects, in my case it's PolyglotCode. Looking ahead, it was enjoyable process as I haven't faced a merge conflicts.
New features
Feature 1
This feature adds support for streaming responses with --stream
/-s
options.
First of all, I have created an Issue#7. There I have provided a full description of my feature that was implemented.
It was hard to implement this issue, for the reason that I had to make a huge research to understand how to handle streaming. You understood me correctly, it wasn't hard to invoke the streaming, but processing the data and displaying it to the screen. Here's the result of all manipulations:
Merged using git merge
with this commit.
Feature 2
Second feature is addition of helpful error messages. So, in case if it has error now it exits with code 1, instead of 0 following by appropriate descriptive error message.
It wasn't hard to implement as I just went through the Cohere API documentation and found the list of error codes to add the description to each using switch-case logic. Obviously, opened an Issue#8.
Example:
Merged with commit
Conclusion
As it mentioned earlier, I haven't faced any problems completing this week's lab. Haven't faced a merge conflicts, so everything went smoothly. I really enjoyed the process of working with parallel branches; for the reason, once I would get stack in the first branch, I would immediately switch the branch and work on the other feature.
Top comments (0)