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

Add CLI command to get mapmaker geolocation responses #53

Merged
merged 1 commit into from
Dec 29, 2023
Merged
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
17 changes: 17 additions & 0 deletions neon_iris/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,23 @@ def get_wolfram_response(api, unit, latitude, longitude, question):
click.echo(pformat(resp))


@neon_iris_cli.command(help="Query Map Maker Geolocation endpoint")
@click.option('--latitude', '--lat',
help="location latitude")
@click.option('--longitude', '--lon',
help="location latitude")
@click.option('--query', '-q', help="Name of location to look up")
def get_mapmaker_response(latitude, longitude, query):
from neon_iris.util import query_api
_print_config()
query = {"lat": latitude,
"lon": longitude,
"address": query,
"service": "map_maker"}
resp = query_api(query)
click.echo(pformat(resp))


@neon_iris_cli.command(help="Converse with an LLM")
@click.option('--llm', default="chat_gpt",
help="LLM Queue to interact with ('chat_gpt' or 'fastchat')")
Expand Down
Loading