From 8bf80a469ba53807dbe9144e43b865c6ea1f0a53 Mon Sep 17 00:00:00 2001 From: winstxnhdw Date: Mon, 23 Sep 2024 20:04:31 +0100 Subject: [PATCH] chore(schema): rename field in `Files` to `indices` --- server/api/v1/chat.py | 2 +- server/schemas/v1/files.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/api/v1/chat.py b/server/api/v1/chat.py index 494e445..7172f82 100644 --- a/server/api/v1/chat.py +++ b/server/api/v1/chat.py @@ -107,7 +107,7 @@ async def upload_files( responses.append(file_id) - return Files(documents=responses) + return Files(indices=responses) @post('/{chat_id:str}/query') async def query( diff --git a/server/schemas/v1/files.py b/server/schemas/v1/files.py index 3790da9..6ed1b65 100644 --- a/server/schemas/v1/files.py +++ b/server/schemas/v1/files.py @@ -11,7 +11,7 @@ class Files(Struct): Attributes ---------- - documents (list[File]) : the document schemas + indices (list[File]) : the document schemas """ - documents: Annotated[list[str], Meta(examples=['glsODUdnaUei_A_IxfSRI'])] + indices: Annotated[list[str], Meta(examples=['glsODUdnaUei_A_IxfSRI'])]