yoheinakajima / instagraph

Converts text input or URL into knowledge graph and displays
MIT License
3.27k stars 281 forks source link

Update the last knowledge graph with "+instruction" #76

Closed snakajima closed 10 months ago

snakajima commented 10 months ago

Summary by CodeRabbit

coderabbitai[bot] commented 10 months ago

Walkthrough

The changes in main.py introduce a more dynamic response generation in the get_response_data() function. It now handles user input starting with "+" differently, allowing for updates to the knowledge graph. This enhances the interaction with the AI, making it more responsive to different types of user input.

Changes

File Summary
main.py Introduced conditional checks in get_response_data() to handle user input starting with "+". This allows for dynamic prompt generation for the openai.ChatCompletion.create() function, enhancing the AI's interaction based on user input.

🐇

"In the land of code, where logic is king,

Changes were made, improvements they bring.

With a '+' at the start, a new path we tread,

Knowledge graph updates, smartly being fed.

Celebrate, dear friends, for our code is now spry,

More responsive, more dynamic, as quick as a fly!" 🎉


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. ### CodeRabbit Commands - Enter `@coderabbitai pause` as a PR comment to pause the reviews on a PR. - Enter `@coderabbitai resume` as a PR comment to resume the paused reviews. - For on-demand reviews, enter `@coderabbitai review` as a PR comment to trigger a review. This is useful when reviews are automatic disabled at the repository level. - Enter `@coderabbitai: ignore` in the PR description to stop a specific PR from being reviewed. Note these commands work only in the PR comment. For conversations with the bot, please use the review comments on code diffs or files.