Skip to content

Commit

Permalink
馃敡 fix: GET /documents query parameter (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzishuai committed Apr 22, 2024
1 parent 4869933 commit cf92ecc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from langchain_core.runnables.config import run_in_executor
from langchain.text_splitter import RecursiveCharacterTextSplitter
from fastapi import FastAPI, File, Form, UploadFile, HTTPException, status, Request
from fastapi import Query
from langchain_community.document_loaders import (
WebBaseLoader,
TextLoader,
Expand Down Expand Up @@ -108,7 +109,7 @@ async def health_check():


@app.get("/documents", response_model=list[DocumentResponse])
async def get_documents_by_ids(ids: list[str]):
async def get_documents_by_ids(ids: list[str] = Query(...)):
try:
if isinstance(vector_store, AsyncPgVector):
existing_ids = await vector_store.get_all_ids()
Expand Down

0 comments on commit cf92ecc

Please sign in to comment.