Writing a Tool using Promises/async queries #4
-
|
Hello! Javascript/typescript are not my strong suit, so please forgive me if this sounds naive, but I (and I imagine others) would really appreciate the template including a simple example that uses a Promise / async style query as part of a Tool. I'm trying to write a Tool that uses simple API calls to power queries and am struggling a little to integrate Promises into the callflow and Request/Response structure of the template. Just a thought! Ryan |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi Ryan! @ryanbateman Thanks for your question. I've just pushed v1.4.1 which added a new fetch utility file fetchWithTimeout and a new tool get_random_cat_fact to demonstrate async/await for handling Promises. You can also see the Let me know if you have any questions |
Beta Was this translation helpful? Give feedback.
-
|
This is perfect - thank you! Appreciate both the util and the explanation. |
Beta Was this translation helpful? Give feedback.
Hi Ryan! @ryanbateman
Thanks for your question. I've just pushed v1.4.1 which added a new fetch utility file fetchWithTimeout and a new tool get_random_cat_fact to demonstrate async/await for handling Promises.
You can also see the
Projects Using This Templatein the README for my other servers I've built using this template.Let me know if you have any questions
Thank you,
Casey