Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import sys, boto3
aws_access_key_id=sys.argv[1]
aws_secret_access_key=sys.argv[2]
lex = boto3.client('lex-runtime', region_name="us-east-1", aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key)
while True:
var = input("")
lex_response = lex.post_text(botName='politics', botAlias='politicsbot', userId='sadsadsa', inputText=var)
if ('message' in lex_response):
print(lex_response['message'])
else:
print('Something is gone wrong, you broke me')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.