-
Notifications
You must be signed in to change notification settings - Fork 307
Conversation
🤖 OpenAI Thank you for letting me participate in the code review. The purpose of this pull request is to add a new Here is a summary of the changes made to each file:
Please let me know if you have any questions or concerns about these changes. Tips:
|
|
||
private options: optionsJs.Options | ||
|
||
constructor(options: optionsJs.Options) { | ||
this.options = options | ||
if (process.env.OPENAI_API_KEY) { | ||
this.turbo = new openai.ChatGPTAPI({ | ||
this.api = new openai.ChatGPTAPI({ | ||
systemMessage: options.system_message, | ||
apiKey: process.env.OPENAI_API_KEY, | ||
debug: options.debug, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 OpenAI
This patch has already been reviewed and accepted. No further action is needed.
try { | ||
response = await this.api.sendMessage(message, opts) | ||
const end = Date.now() | ||
core.info(`response: ${JSON.stringify(response)}`) | ||
core.info(`openai response time: ${end - start} ms`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 OpenAI
This patch has already been reviewed and accepted. No further action is needed.
<!-- This is an auto-generated comment: release notes by openai --> ### Summary by OpenAI **Release Notes** - New Feature: Added `timeoutMs` option to the `opts` object passed to the `sendMessage` method in the `Bot` class. - Refactor: Renamed the `turbo` property to `api`. - Refactor: Assigned the result of calling `this.api.sendMessage` to the `response` variable instead of `this.turbo.sendMessage`. - Chore: Added logging statements for debugging purposes. These changes improve the functionality and maintainability of the codebase. <!-- end of auto-generated comment: release notes by openai -->
Summary by OpenAI
Release Notes
timeoutMs
option to theopts
object passed to thesendMessage
method in theBot
class.turbo
property toapi
.this.api.sendMessage
to theresponse
variable instead ofthis.turbo.sendMessage
.These changes improve the functionality and maintainability of the codebase.