Skip to content

GET: file chunk data by chunk_id #29#41

Merged
aliamerj merged 2 commits intoDcup-dev:mainfrom
aliamerj:feat-api/retrieve-chunks
Apr 6, 2025
Merged

GET: file chunk data by chunk_id #29#41
aliamerj merged 2 commits intoDcup-dev:mainfrom
aliamerj:feat-api/retrieve-chunks

Conversation

@aliamerj
Copy link
Collaborator

@aliamerj aliamerj commented Apr 6, 2025

Part: #29

Description:

  • define api endpoint /api/chunks/{chunk_id}/{chunk_id}.. : to list file chunks by their IDs.
    Parameters: Requires at least one chunk ID.

API Response Object

[
  {
    "chunkId": "chunk-id-1",
    "fileName": "example.pdf",
    "source": "DIRECT_UPLOAD",
    "metadata": { "key": "value" },
    "pageNumber": 1,
    "dataType": "text",
    "chunkTitle": "Title Example",
    "chunkSummary": "Summary example",
    "chunkContent": "Content of the chunk"
  },
  {
    "chunkId": "chunk-id-2",
    "fileName": "example2.pdf",
    "source": "DIRECT_UPLOAD",
    "metadata": { "key": "value" },
    "pageNumber": 2,
    "dataType": "text",
    "chunkTitle": "Title Example 2",
    "chunkSummary": "Summary example 2",
    "chunkContent": "Content of the chunk"
  }
]

@aliamerj aliamerj requested a review from Copilot April 6, 2025 15:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ali Amer <76897266+aliamerj@users.noreply.github.com>
@aliamerj aliamerj requested a review from Copilot April 6, 2025 15:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (3)

app/api/chunks/[...ids]/route.ts:7

  • [nitpick] Consider renaming 'qdrantCLient' to 'qdrantClient' to follow standard naming conventions.
import { qdrant_collection_name, qdrantCLient } from "@/qdrant";

app/api/chunks/[...ids]/route.ts:51

  • [nitpick] The use of the variable name 'e' is ambiguous; consider renaming it to 'connection' (or a more descriptive name) for better readability.
.flatMap(e => e.files

app/api/chunks/[...ids]/route.ts:52

  • [nitpick] Consider renaming the parameter 'e' to a more descriptive name such as 'file' to improve code clarity.
.flatMap(e => e.chunksIds))

@aliamerj aliamerj merged commit 8fb92b7 into Dcup-dev:main Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants