Feature support by language

Not all features are supported by all languages. Refer to the chart below for feature support by language.

Functions capability by languageAIP LogicTypeScript v1TypeScript v2 [Experimental]Python [Beta]Description
Ontology object supportYesYesYesYesThe ability to access Ontology objects in your function.
Ontology edits supportYesYesYesYesThe ability to edit Ontology objects in your function.
Queryable in WorkshopYesYesYesYesInvoking a function from a Workshop application.
Usable in Pipeline BuilderNoNoNoYesCalling a function from Pipeline Builder pipelines.
Functions on models supportYesYesNoNoExecuting live deployment models from a function.
Semantic search supportYesYesNoNoUse functions to create vectors for semantic search.
Webhook supportNoYesNoNoThe ability to call webhooks from functions.
External API call supportNoYesYesYesQuerying external services from within functions.
Serverless execution supportYesYesYesYesA serverless function will be spun up on demand when invoked. Refer to serverless functions below for more information.
Deployed execution supportNoNoNoYesA deployed function will have dedicated resources allocated to it, ready to serve requests.
Call function from API gatewayYesYesYesYesThe ability to hit a query function from the API gateway.
Marketplace supportYesYesNoNoThe ability to package and ship functions in Marketplace.
Bring-your-own-modelYesYesNoNoThe ability to register a function as a model.

Ontology SDK support

Python and TypeScript v2 functions support the Ontology SDK (OSDK). The OSDK allows you to leverage the Ontology directly from your development environment and provides benefits such as compatibility with Developer Console and OSDK versioning. We recommend using Python or TypeScript v2 to access these benefits in your functions repository.

TypeScript v1 vs. TypeScript v2

Both TypeScript v1 and TypeScript v2 allow users to leverage TypeScript's core language features, but there are differences in supported platform features, as shown in the feature support table above. We recommend building workflows using TypeScript v2 functions to take advantage of several key improvements over TypeScript v1:

  • Serverless execution in a full Node.js runtime: TypeScript v2 functions run in a Node.js environment, supporting core modules like fs, child_process, and crypto. This enables greater compatibility with NPM libraries that interact with the file system, perform CPU-intensive tasks in parallel, or require other system-level operations.
  • First-class OSDK support: The OSDK can now be used seamlessly in TypeScript v2 functions, making it easy to reuse code, both in and out of the platform. It also provides more efficient APIs for working with large-scale Ontology data.
  • Configurable resource requests: TypeScript v2 functions allow you to request up to 8 vCPUs and 5GB of memory, offering greater control over performance and scalability.

If you need to leverage features such as semantic search or deploying to Marketplace, then TypeScript v1 is the recommended option as these features are not yet supported by TypeScript v2.

Serverless functions

If serverless functions are enabled for your enrollment, new repositories will use serverless functions by default. We recommend using serverless functions instead of deployed functions for most use cases. With serverless functions, you can have multiple versions of a single function available on demand, making upgrades safer.

When using Python functions, there are also some cases where deployed functions are preferred or must be used instead of serverless, but these are not common. If available, serverless functions are preferred for several reasons:

  • Serverless functions enable different versions of a single function to be executed on demand, making upgrades safer. With deployed functions, you can only run a single function version at a time.
  • Serverless functions only incur costs when executed, while deployed functions incur costs as long as the deployment is running.
  • Serverless functions require less upfront setup and long-term maintenance, as the infrastructure is managed automatically.