private-gpt icon indicating copy to clipboard operation
private-gpt copied to clipboard

Adding possibility to ask questions via REST API (for use with my project for Code Review/Scanning)

Open marcinguy opened this issue 2 years ago • 2 comments

Great project.

Plan to use private "PrivateGPT" along OpenAI GPT for Code Review/Code Scanning.

Exposed the interface to do it via REST API

It can be now loaded as a plugin in my project (https://github.com/marcinguy/betterscan-ce)

betterscan-cli

Maybe it helps others., also with their projects.

It is a WIP.

Comments/feedback is welcome.

marcinguy avatar May 21 '23 14:05 marcinguy

The RAM is not freed after 1 api call. It keeps increasing in each call. Please add the code to free up the ram after each api call.

gaurav-cointab avatar May 21 '23 15:05 gaurav-cointab

@gaurav-cointab Thanks

If you run it with gunicorn and not in debug mode the leak hopefully should not happen. Maybe just not in debug mode will be sufficient.

It was a quick PR for my needs.

I also saw this: https://github.com/imartinez/privateGPT/pull/329

I think Gradio has REST API, so maybe it can be used from there.

marcinguy avatar May 22 '23 12:05 marcinguy