Not all features are supported by all languages. Refer to the chart below for feature support by language.
Functions capability by language | AIP Logic | TypeScript v1 | TypeScript v2 [Experimental] | Python [Beta] | Description |
---|---|---|---|---|---|
Ontology object support | Yes | Yes | Yes | Yes | The ability to access Ontology objects in your function. |
Ontology edits support | Yes | Yes | Yes | Yes | The ability to edit Ontology objects in your function. |
Queryable in Workshop | Yes | Yes | Yes | Yes | Invoking a function from a Workshop application. |
Usable in Pipeline Builder | No | No | No | Yes | Calling a function from Pipeline Builder pipelines. |
Functions on models support | Yes | Yes | No | No | Executing live deployment models from a function. |
Semantic search support | Yes | Yes | No | No | Use functions to create vectors for semantic search. |
Webhook support | No | Yes | No | No | The ability to call webhooks from functions. |
External API call support | No | Yes | Yes | Yes | Querying external services from within functions. |
Serverless execution support | Yes | Yes | Yes | Yes | A serverless function will be spun up on demand when invoked. Refer to serverless functions below for more information. |
Deployed execution support | No | No | No | Yes | A deployed function will have dedicated resources allocated to it, ready to serve requests. |
Call function from API gateway | Yes | Yes | Yes | Yes | The ability to hit a query function from the API gateway. |
Marketplace support | Yes | Yes | No | No | The ability to package and ship functions in Marketplace. |
Bring-your-own-model | Yes | Yes | No | No | The ability to register a function as a model. |
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.
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:
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.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.
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: