Antonio Cheong commited on
Commit
570a557
·
1 Parent(s): f17417b

Adaptive card has citations

Browse files
Files changed (2) hide show
  1. example.py +20 -0
  2. src/EdgeGPT.py +1 -1
example.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ from EdgeGPT import Chatbot
3
+
4
+
5
+ async def main():
6
+ bot = Chatbot()
7
+ await bot.start()
8
+
9
+ result = json.dumps(
10
+ await bot.ask("Check GitHub for a repository names 'EdgeGPT'"), indent=4
11
+ )
12
+ print(result)
13
+
14
+ await bot.close()
15
+
16
+
17
+ if __name__ == "__main__":
18
+ import asyncio
19
+
20
+ asyncio.run(main())
src/EdgeGPT.py CHANGED
@@ -278,7 +278,7 @@ async def main():
278
  await bot.reset()
279
  continue
280
  print("Bot:")
281
- print((await bot.ask(prompt=prompt))["item"]["messages"][1]["text"])
282
  await bot.close()
283
 
284
 
 
278
  await bot.reset()
279
  continue
280
  print("Bot:")
281
+ print((await bot.ask(prompt=prompt))["item"]["messages"][1]["adaptiveCards"][0]["body"][0]["text"])
282
  await bot.close()
283
 
284