Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inputs #175

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/resolve_market/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeid4rob6qbhlyoal6jdjk7liyxhmq4uqmfjxrupkanh5lztogl4n4y
resolve_market.py: bafybeibpks6qumixuuyguenvqabsygbmgj6qjg554nspd3k3blbnmajif4
resolve_market.py: bafybeiaxtjkwgp4ni54ettlesdhnljyaenijt5vnezlybmuwvnnagrgtii
fingerprint_ignore_patterns: []
entry_point: resolve_market.py
callable: run
Expand Down
18 changes: 1 addition & 17 deletions tools/resolve_market/resolve_market.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,22 +365,6 @@ def run(**kwargs) -> Tuple[Optional[str], Optional[Dict[str, Any]], Any]:
raise ValueError(f"Tool {tool} is not supported.")

market_behavior = CloseMarketBehaviourMock(**kwargs)
question = kwargs.pop("question", None)
question = kwargs.pop("prompt", None)
result = market_behavior._get_answer(question)
return result


if __name__ == "__main__":
newsapi_api_key = os.getenv("NEWSAPI_API_KEY")
openai_api_key = os.getenv("OPENAI_API_KEY")

my_kwargs = {
"tool": "close_market",
"question": "Will a cease-fire be implemented in the Gaza Strip by 5 February 2024?",
"api_keys": {
"newsapi": newsapi_api_key,
"openai": openai_api_key,
},
}

print(run(**my_kwargs))
2 changes: 1 addition & 1 deletion tools/resolve_market_reasoning/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeibtv3zzi5vssl6kssgxdzbjrdrdelyrt2numoxxtbervihh4x2w6i
resolve_market_reasoning.py: bafybeibu36cft3gqmg4yfs2zrafkav56pirlywrmpsjjjoiv54nzewfuxm
resolve_market_reasoning.py: bafybeig5y67gz6lav6fktg6qfzupcifjbe5g6j7wpnui36uqjhvsf4kxmq
fingerprint_ignore_patterns: []
entry_point: resolve_market_reasoning.py
callable: run
Expand Down
2 changes: 1 addition & 1 deletion tools/resolve_market_reasoning/resolve_market_reasoning.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def run(**kwargs) -> Tuple[Optional[str], Optional[Dict[str, Any]], Any]:
"""Run the task"""
with OpenAIClientManager(kwargs["api_keys"]["openai"]):
tool = kwargs["tool"]
prompt = kwargs["question"]
prompt = kwargs["prompt"]
counter_callback = kwargs.get("counter_callback", None)
api_keys = kwargs.get("api_keys", {})
google_api_key = api_keys.get("google_api_key", None)
Expand Down
Loading