ykdojo / kaguya

A ChatGPT plugin that allows you to load and edit your local files in a controlled way, as well as run any Python, JavaScript, and bash script.
http://kaguya.ai/
MIT License
1.2k stars 192 forks source link

Read multiple files should be a get operation #34 #35

Closed ThirDecade2020 closed 11 months ago

ThirDecade2020 commented 11 months ago

The differences are:

The HTTP method has been changed from post to get. The requestBody section has been replaced with a parameters section. The filePaths parameter is now a query parameter (in: query) instead of being part of the request body. This is because GET requests should not have a body.

The changes are:

The condition if (req.method === "POST") has been changed to if (req.method === "GET") to handle GET requests instead of POST requests. The filePaths parameter is now retrieved from req.query instead of req.body, because GET requests should not have a body.

ykdojo commented 11 months ago

Looks good! You tested it right? Just to make sure.

ykdojo commented 11 months ago

Anyway thank you! I tested it on my end