Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: create an api.http file to test upload API [Close #06] #22

Merged
merged 4 commits into from
Mar 27, 2024

Conversation

glaucia86
Copy link
Contributor

@glaucia86 glaucia86 commented Mar 27, 2024

Purpose

This PR is related with: #6 and close it too

  • Create an api.http file to test this API using REST Client extension
  • made some adjustments to the .md files related to guidance on how to execute this request in the api.http file

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[x] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

Or you can see in action in the gif below

chat-final-result

  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

This pull request includes changes to the packages/api/api.http file. The changes include modifying an API endpoint description and introducing a new way to upload PDF documents.

API endpoint modification:

  • packages/api/api.http: The description of the POST request to /api/chat has been changed from "Chat with a bot (this is a sample)" to "Create a new question".

Introduction of new upload method:

  • packages/api/api.http: The POST request to /api/upload has been updated to accept multipart/form-data. This allows for the uploading of PDF documents, with an example provided for a file named "test.pdf". Additionally, the request now accepts a JSON object named "options" with parameters for "category", "wait", and "useVectors".

@glaucia86 glaucia86 self-assigned this Mar 27, 2024
@glaucia86 glaucia86 added documentation Improvements or additions to documentation backend labels Mar 27, 2024
packages/api/api.http Outdated Show resolved Hide resolved
docs/development/03-session.md Outdated Show resolved Hide resolved
@sinedied sinedied merged commit 3be7793 into main Mar 27, 2024
5 checks passed
@sinedied sinedied deleted the GL/create-file-test-upload-api branch March 27, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants