From bc5de92aff84a66da0ac6aa3ff1642f52e25cb89 Mon Sep 17 00:00:00 2001 From: fatwang2 <134143178+fatwang2@users.noreply.github.com> Date: Fri, 22 Mar 2024 15:44:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d5384fb..148a5da 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
-

Search with Lepton

+

Search4All

Build your own conversational search engine using less than 500 lines of code.
Live Demo From ef7c21f5ff106bb9815cf09eb324dda4ca2ebfec Mon Sep 17 00:00:00 2001 From: 6drf21e Date: Sat, 23 Mar 2024 16:12:28 +0800 Subject: [PATCH 2/2] Fix format of search results in search_with_search1api function --- search4all.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/search4all.py b/search4all.py index 6e83092..7ae2a52 100644 --- a/search4all.py +++ b/search4all.py @@ -124,6 +124,10 @@ def search_with_search1api(query: str, search1api_key: str): json_content = response.json() try: contexts = json_content[:REFERENCE_COUNT] + # fix the format + for item in contexts: + item["name"] = item["title"] + item["url"] = item["link"] except KeyError: logger.error(f"Error encountered: {json_content}") return []