Skip to main content
6-Contributor
Sep 19, 2024 6:17 AM UTC
Solved

Generative AI with Thing Worx integration

can we do Generative AI with Thing Worx integration? if yes. what are the ways to achieve that. suggest some use cases.
Thanks  in advance!!

Rocko
RockoAnswer
19-Tanzanite
Sep 19, 2024 6:49 AM UTC

Depends on what you want to do. When you already have a webapp, you can "integrate" it into your mashup using Web Frame. But you're looking for more.

 

Most of the Gen AI stuff comes in Python code.

Some comes in JS but you can't use that in TWX service code directly due to the limitations for importing libraries, the Rhino engines capabilities and also because you wouldn't want to run GenAI stuff in TWX core.

 

So the easiest way to go is to create your GenAI code in Python, then slap a REST API onto it (e.g. with FastAPI/Uvicorn) and call those service via ContentLoader from TWX. It's a nice separation and you can run it wherever you want.

1 reply

Rocko
Rocko19-TanzaniteAnswer
19-Tanzanite
Sep 19, 2024 6:49 AM UTC

Depends on what you want to do. When you already have a webapp, you can "integrate" it into your mashup using Web Frame. But you're looking for more.

 

Most of the Gen AI stuff comes in Python code.

Some comes in JS but you can't use that in TWX service code directly due to the limitations for importing libraries, the Rhino engines capabilities and also because you wouldn't want to run GenAI stuff in TWX core.

 

So the easiest way to go is to create your GenAI code in Python, then slap a REST API onto it (e.g. with FastAPI/Uvicorn) and call those service via ContentLoader from TWX. It's a nice separation and you can run it wherever you want.

Translate