Created
July 21, 2024 16:41
-
-
Save idontcalculate/4e77124587d686065b00c226a8476bbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from query import search_books | |
def main(): | |
query_text = "carl sagan, cosmos" | |
results = search_books(query_text) | |
if not results: | |
print("No results found") | |
else: | |
for point in results: | |
title = point.payload.get('title', 'Unknown Title') | |
description = point.payload.get('description', 'No description available') | |
categories = point.payload.get('categories', 'Uncategorized') | |
print(f"Title: {title}\nDescription: {description}\nCategories: {categories}\n---") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment