Open PycKamil opened 4 months ago
CodeRabbit
This update introduces support for Azure bot using the langchain
package, enhancing flexibility and maintainability. It includes new configurations for Azure API instance, deployment, and version. The code now uses the BotProtocol
interface instead of the Bot
class, allowing both AzureBot
and Bot
to be used interchangeably.
Files | Summary |
---|---|
action.yml , package.json , tsconfig.json |
Added @langchain/openai package and updated dependencies. Introduced skipLibCheck option in TypeScript configuration. |
src/azure-bot.ts , src/bot-interface.ts , src/bot.ts , src/main.ts , src/options.ts |
Implemented AzureBot class and BotProtocol interface. Modified run function to create AzureBot instances under certain conditions. Added new options for Azure API configuration. |
src/review-comment.ts , src/review.ts |
Replaced Bot class with BotProtocol interface in import statements and function signatures. Updated handleReviewComment function to accept heavyBot parameter of type BotProtocol . |
"With a hop and a skip, we've made quite the trip, ππ¨
From Bot to Protocol, oh what a spectacle! ππ©
Azure's in sight, shining so bright, βοΈβ¨
Our code's taken flight, thanks to this update's might!" ππ
Uplevel your code reviews with CodeRabbit Pro
### CodeRabbit Pro If you like this project, please support us by purchasing the [Pro version](https://coderabbit.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.
[!WARNING]
CodeRabbit GitHub Action Detected
The repository is using both CodeRabbit Pro and CodeRabbit Open Source (via GitHub Actions), which is not recommended as it may lead to duplicate comments and extra noise. Please remove the CodeRabbit GitHub Action.
The recent update introduces the AzureBot
class, integrating Azure services with an OpenAI chat model, and refines the bot interaction framework by segregating interfaces to a new file and updating dependencies across the board. This revamp enhances flexibility in bot instantiation, especially with Azure deployments, and streamlines the bot communication protocol for improved interaction and response handling.
Files | Change Summaries |
---|---|
src/azure-bot.ts |
Introduces AzureBot class for Azure/OpenAI chat model integration. |
src/bot-interface.ts |
Adds interfaces for Ids and BotProtocol , including a chat method. |
src/bot.ts , src/review*.ts |
Implements BotProtocol interface; references to Bot updated to BotProtocol . |
src/main.ts , src/options.ts |
Adds Azure API configuration options and conditional AzureBot instantiation. |
"In the digital meadow, under the cloud's gaze,
π A new bot hops forth, through the cybernetic maze.
Azure skies above, with OpenAI's might,
It chats, it learns, in the soft server light.
Code and bytes, in harmony blend,
A tale of updates, where innovation ascends."
ππΏπ₯οΈπΏπ
What: Added
langchain
package that is used inAzureBot
for communicating with Azure API. Based on provided configurationAzureBot
will be used as Bot.Why: This fixes issue #382. Enable to use coderabbitai with Azure API.
Summary by CodeRabbit
New Features
AzureBot
class for integrating with Azure services and OpenAI chat model.Refactor
Bot
class to implement the newBotProtocol
interface.BotProtocol
in place of directBot
references, improving flexibility and maintainability.Summary by CodeRabbit
BotProtocol
interface to improve flexibility and maintainability. The code can now handle different types of bots, not just the originalBot
.package.json
file and added theskipLibCheck
option to the TypeScript configuration file for better development experience.