소스 검색

Merge pull request #12517 from Ithanil/only_keep_retrieved_urls

fix: only keep URLs as sources for which the content was actually retrieved
Timothy Jaeryang Baek 5 달 전
부모
커밋
635c08a5ab
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      backend/open_webui/routers/retrieval.py

+ 1 - 0
backend/open_webui/routers/retrieval.py

@@ -1478,6 +1478,7 @@ async def process_web_search(
             trust_env=request.app.state.config.RAG_WEB_SEARCH_TRUST_ENV,
         )
         docs = await loader.aload()
+        urls = [doc.metadata["source"] for doc in docs] # only keep URLs which could be retrieved
 
         if request.app.state.config.BYPASS_WEB_SEARCH_EMBEDDING_AND_RETRIEVAL:
             return {