OWASP-BLT / BLT

OWASP BLT is a bug logging tool to report issues and get points, companies are held accountable.
https://blt.owasp.org
GNU Affero General Public License v3.0
130 stars 129 forks source link

Project 1: AI Chatbot for Whole Website #2254

Closed JisanAR03 closed 4 weeks ago

JisanAR03 commented 1 month ago

Title: Completion of Project-1 and Resolution of Subtasks #2124 - #2132

Overview:

This pull request aims to finalize the development of Project-1 and resolves the associated subtasks specified below. Additionally, it introduces the necessary steps for server-side implementation, including running a management command and configuring the environment variables.


Api Endpoint : path("api/ask/", question_answer_view, name="ask"),
so for call that api we have to use "{domain}/api/ask/"


Details:

Project-1: AI Chatbot for Whole Website from #2072

Subtasks Completed:

Server-Side Implementation:

To ensure the chatbot functions correctly on the server, the following steps are required:

  1. Run Management Command: Execute the command python manage.py update_faiss to update the FAISS index.
  2. Environment Configuration: Ensure the OPENAI_API_KEY is set in the .env file.

Conclusion:

This pull request completes the development and integration of the AI chatbot for the website, addressing all specified subtasks. The implementation has been thoroughly tested and refined to meet project requirements. Kindly review and merge this pull request to integrate the final changes into the project.


Thank you for your attention to this matter. Please let me know if there are any questions or further clarifications needed.

screenshot from implementation :
image

AtmegaBuzz commented 1 month ago

If you are taking the api from env then can you also add gpt api key variable in .env.example. Also it would be great if you can add a check on api credits exhausted and prompt Bot is down

JisanAR03 commented 1 month ago

If you are taking the api from env then can you also add gpt api key variable in .env.example. Also it would be great if you can add a check on api credits exhausted and prompt Bot is down

Thank you sir, for this suggestion . I will recheck the error handling part ,when the api credit are exhausted

JisanAR03 commented 1 month ago

Please look at the following suggestion when you get a chance:

ok sure I will check those out

JisanAR03 commented 1 month ago

@arkid15r sir, updated the suggestion

JisanAR03 commented 1 month ago

If you are taking the api from env then can you also add gpt api key variable in .env.example. Also it would be great if you can add a check on api credits exhausted and prompt Bot is down

sir now update with error handling part too

JisanAR03 commented 1 month ago

@arkid15r sir , the conflict is solve now

JisanAR03 commented 1 month ago

LGTM, you need just get @DonnieBLT's approval

Thank you so much

DonnieBLT commented 1 month ago

Can we please have a way of setting 10 OpenAI requests per day?

JisanAR03 commented 1 month ago

Can we please have a way of setting 10 OpenAI requests per day?

@DonnieBLT sir , now I update the code , @arkid15r , is there any suggestion for me?

DonnieBLT commented 1 month ago

I have another concern is that if we write a file to the server it will be deleted if it ever gets deployed again so if we need to store a file, we can use Django storages

JisanAR03 commented 1 month ago

I have another concern is that if we write a file to the server it will be deleted if it ever gets deployed again so if we need to store a file, we can use Django storages

sure sir, I'm looking for it.

JisanAR03 commented 1 month ago

@arkid15r sir , can you please review the latest commit

DonnieBLT commented 1 month ago

I was thinking it would also be good for us to send these messages to Slack to analyze them for accuracy

JisanAR03 commented 1 month ago

@arkid15r sir, updated the code in new commit . can you please review ?

JisanAR03 commented 1 month ago

@arkid15r sir, there was a conflict with another PR , that's why I make another commit 🙂

arkid15r commented 1 month ago

@arkid15r sir, there was a conflict with another PR , that's why I make another commit 🙂

Yeah, that's fine. Thanks for fixing that!

JisanAR03 commented 4 weeks ago

@DonnieBLT thank you so much

Uttkarsh-raj commented 3 weeks ago

Great work @JisanAR03. I had the same project idea and i think this pr also resolves the following issues.