Skip to content

Commit

Permalink
Add CLI command to get mapmaker geolocation responses (#53)
Browse files Browse the repository at this point in the history
# Description
Add `iris get-mapmaker-response` for geolocation service

# Issues
<!-- If this is related to or closes an issue/other PR, please note them
here -->

# Other Notes
<!-- Note any breaking changes, WIP changes, requests for input, etc.
here -->

Co-authored-by: Daniel McKnight <[email protected]>
  • Loading branch information
NeonDaniel and Daniel McKnight authored Dec 29, 2023
1 parent b3ecbf1 commit b4f22a5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions neon_iris/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,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

0 comments on commit b4f22a5

Please sign in to comment.