Skip to content

Commit

Permalink
Stop implying that json has FULL results
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudotensor committed Oct 30, 2024
1 parent 5dd897c commit 81841bb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions openai_server/agent_tools/bing_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ def print_info(info, args):
if args.output:
with open(args.output, 'wt') as f:
json.dump(info, f, indent=2, default=str)
print(f"\nFull JSON output saved to: {args.output}")
print(f"\nJSON output saved to: {args.output}")
else:
print("\nFull JSON output:")
print("\nJSON output:")
print(json.dumps(info, indent=2, default=str))
else:
for key, value in info.items():
Expand Down
10 changes: 5 additions & 5 deletions openai_server/agent_tools/google_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ def save_results_to_file(results: Dict[str, Any], filename: str) -> None:
with open(filename, 'w') as f:
json.dump(results, f, indent=2)
print(
f"""\n# Full search results available in this JSON file: {filename}
* One can write python code to extract the keys one wants from the JSON file.
f"""\n# Search results for specific the keys are in this JSON file: {filename}
* One can write python code to extract certain keys from the JSON file, but this file does not contain specific or detailed information for the query, you use should pass specific URLs to ask_question_about_documents.py for specific or detailed information.
""")


Expand Down Expand Up @@ -264,12 +264,12 @@ def google_search():

results = perform_search(args)

# Save full results to a file
save_results_to_file(results, f"{args.engine}_{args.type}_search_results.json")

# Print results
print_results(results, args)

# Save full results to a file
save_results_to_file(results, f"{args.engine}_{args.type}_search_results.json")


if __name__ == "__main__":
google_search()
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5417bc34452bddca8f8f421a5394c0d748a62499"
__version__ = "5dd897cae4961dd36d9353722c529ae34f5fe106"

0 comments on commit 81841bb

Please sign in to comment.