RiveBot/brain/wolfram.rive
Mathieu Maret 11986cc5aa Initial commit
ok, ok, it a late initial one

include a wolfram search, some simple talking.
Add a quickly, poorly written network server.
2015-12-29 17:59:27 +01:00

22 lines
454 B
Plaintext

! version = 2.0
> object wolfram_alpha python
import tungsten
APP_ID = 'TK5JGE-E4W4PA38LH'
query = ' '.join(args)
client = tungsten.Tungsten(APP_ID)
result = client.query(query)
print(result)
for pod in result.pods:
print(pod.id)
if pod.id == "Result":
return u'\n'.join(pod.format['plaintext'])
return u"I do not understand :("
< object
+ tell[-]me *
- <call>wolfram_alpha <star> </call>