Function Management
Listing Functions
To view all functions available in your current context, use the list command. This provides an overview of function names, IDs, and their current configurations.
fathom intelligence function list
Creating a Function
The create command initializes a new serverless function entry on the platform. This step sets the “blueprint” for your function, defining its runtime environment and hardware requirements before you upload any code.
fathom intelligence function create <NAME> [OPTIONS]
Key Arguments & Options
| Argument/Option | Requirement | Description |
|---|---|---|
| <NAME> | Required | The name of the function. |
| –description, -d | Required | A brief description of the function’s purpose. |
| –kind, -k | Required | Build environment kind. Values: rust189, rust186, python310, go124. |
| –serving-size | Required | Computational resources: small, large, or extra-large. |
| –auto-create | Optional | Automatically creates a sample application structure for you. |
Advanced Configuration Options
| Option | Type | Description |
|---|---|---|
| –build-env | KEY=VALUE | Environment variables used strictly during the build process. |
| –serving-env | KEY=VALUE | Environment variables available to the running service. |
| –serving-gpu | Enum | GPU variant to attach: nvidia-l4 or nvidia-l4-2x. |
| –serving-timeout | Seconds | Maximum execution time before the function times out. |
| –schema-input | JSON | JSON schema to validate incoming request data. |
| –schema-output | JSON | JSON schema to validate outgoing response data. |
Example: Simple Python Function
To create a simple python function with sample application code type:
fathom intelligence function create test1 --description 'Just testing' --kind python310 --serving-size small
Next Step
Now that you have created a function resource, you need to sync your local code with the platform.
Proceed to Source Management to learn how to upload your function logic.
Updating a Function
Use the update command to modify an existing function’s configuration. This is commonly used to adjust scaling, update secrets via environment variables, or rename the resource.
fathom intelligence function update <FUNCTION_ID> [OPTIONS]
| Option | Requirement | Description |
|---|---|---|
| <FUNCTION_ID> | Required | The unique ID of the function you wish to update. |
| –name, -n | Optional | Update the display name of the function. |
| –description, -d | Optional | Update the function’s description. |
| –serving-size, -s | Optional | Change the hardware tier (small, large, extra-large). |
| –serving-env | Optional | Update or add new runtime environment variables (KEY=VALUE). |
| –serving-gpu | Optional | Change the GPU variant or attach one to the service. |
| –serving-timeout | Optional | Adjust the execution timeout in seconds. |
Example: Scaling an Existing Function
If your function requires more memory or a longer execution time, you can update it as follows:
fathom intelligence function update 1fc6c0ba-2ab6-4c0d-8a32-3a6374956aa3 --serving-size extra-large --serving-timeout 600