# 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 language | AIP Logic | TypeScript v1 | TypeScript v2 | Python | Description | |----------------------------------|-----------|---------------|---------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------| | Ontology object support | Yes | Yes | Yes | Yes | The ability to [access Ontology objects](../foo-getting-started/index.md) in your function. | | Ontology interfaces support | No | No | Yes | No | The ability to access and edit Ontology interfaces in your function. | | Ontology edits support | Yes | Yes | Yes | Yes | The ability to [edit Ontology objects](../edits-overview/index.md) in your function. | | Media handling support | No | Yes | Partial | Partial | The ability to interact with [media items](../media/index.md). TypeScript v1 supports full media operations, including document OCR and audio transcription. TypeScript v2 and Python support media uploads via Ontology edits and basic operations on media properties, but do not support document-specific or audio-specific operations. | | Queryable in Workshop | Yes | Yes | Yes | Yes | Invoking a function from a [Workshop application](../../workshop/functions-use/index.md). | | Usable in Pipeline Builder | No | No | No | Yes | Calling a function from [Pipeline Builder pipelines](../python-functions-builder/index.md). | | Functions on models support | Yes | Yes | Yes | Yes | Executing live deployment models [from a function](../functions-on-models/index.md). TypeScript v2 and Python require ontology-bound model functions. | | Language model integration | No | No | Yes | Yes | Calling language models through [proxy endpoints](../language-models-python-tsv2/index.md) using model aliases and Platform SDK imports. | | Semantic search support | Yes | Yes | Yes | Yes | Use functions to create vectors for [semantic search](../../ontology/overview-semantic-search/index.md). | | Webhook support | No | Yes | Partial | Partial | The ability to call [webhooks from functions](../webhooks/index.md). TypeScript v1 can call webhooks directly; TypeScript v2 and Python require publishing the webhook as a [webhook function](../../data-connection/webhooks-reference/index.md#webhook-functions). | | External API call support | No | Yes | Yes | Yes | Querying external services from [within functions](../api-calls/index.md). | | Serverless execution support | Yes | Yes | Yes | Yes | A serverless function will be spun up on demand when invoked. Refer to [serverless functions](#serverless-functions) below for more information. | | Deployed execution support | No | No | Yes | Yes | A deployed function will have dedicated resources allocated to it, ready to serve requests. | | Staged writes support \[Beta] | No | No | Yes | Yes | The ability to use staged writes in [TypeScript v2](../typescript-v2-staged-writes/index.md) and [Python](../python-staged-writes/index.md) for read-after-write guarantees and atomic execution in edit functions. | | Call function from API gateway | Yes | Yes | Yes | Yes | The ability to hit a [query function](../query-functions/index.md) from the API gateway. | | Marketplace support | Yes | Yes | Yes | Yes | The ability to package and ship functions in [Marketplace](../../marketplace/overview/index.md). | | Bring-your-own-model | Yes | Yes | No | No | The ability to register a function [as a model](../../aip/bring-your-own-model/index.md). The [function interface method](../../aip/chat-completion-function-interface-quickstart/index.md) is a legacy approach that applies to TypeScript v1 only. | ## Ontology SDK support Python and TypeScript v2 functions support the [Ontology SDK](../../ontology-sdk/overview/index.md) (OSDK). The OSDK allows you to leverage the Ontology directly from your development environment and provides [benefits](../../ontology-sdk/overview/index.md#osdk-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. * **Staged writes \[Beta]:** TypeScript v2 supports [staged writes](../typescript-v2-staged-writes/index.md), an alternative execution model for Ontology edit functions that provides read-after-write guarantees within the function and allows nested calls to other staged-write functions. ## 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 or TypeScript v2 functions, there are also [some cases where deployed functions are preferred](../functions-deployed/index.md#choose-between-deployed-and-serverless-execution-modes) 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.