Skip to content

Commit

Permalink
maybe fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzii committed Jan 25, 2024
1 parent 2df8734 commit 0344cbb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion prediction_market_agent/tools/google_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def google_search(query: str) -> list[str]:
params = {"q": query, "api_key": utils.get_keys().serp, "num": 4}
params = {"q": query, "api_key": utils.get_serp_api_key(), "num": 4}
search = serpapi.GoogleSearch(params)
urls = [result["link"] for result in search.get_dict()["organic_results"]]
return urls
Expand Down
2 changes: 2 additions & 0 deletions tests/test_manifold.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import pytest
from prediction_market_agent import utils
from prediction_market_agent.markets import manifold
from prediction_market_agent.tools.gtypes import mana_type


@pytest.mark.skipif(utils.get_manifold_api_key() is None, reason="No Manifold API key")
def test_manifold() -> None:
market = manifold.pick_binary_market()
print(market.question)
Expand Down
3 changes: 3 additions & 0 deletions tests/test_tools.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import pytest
from prediction_market_agent import utils
from prediction_market_agent.tools.google_search import GoogleSearchTool
from prediction_market_agent.tools.web_scrape import _summary, web_scrape


@pytest.mark.skipif(utils.get_serp_api_key() is None, reason="No Serp API key")
def test_search_and_scrape() -> None:
objective = "In 2024, will Israel conduct a military strike against Iran?"
search = GoogleSearchTool().fn(query=objective)
Expand Down

0 comments on commit 0344cbb

Please sign in to comment.