You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Writing your worker-config.json](#writing-your-worker-configjson)
63
+
-[Example of schema](#example-of-schema)
64
+
-[Example of versions](#example-of-versions)
61
65
62
66
# Setting up the Serverless Worker
63
67
@@ -514,3 +518,86 @@ Your list can contain any number of messages, and each message usually can have
514
518
]
515
519
```
516
520
521
+
</details>
522
+
523
+
# Worker Config
524
+
The worker config is a JSONfile that is used to build the form that helps users configure their serverless endpoint on the RunPod Web Interface.
525
+
526
+
Note: This is a new feature and only works for workers that use one model
527
+
528
+
## Writing your worker-config.json
529
+
The JSON consists of two main parts, schema and versions.
530
+
-`schema`: Here you specify the form fields that will be displayed to the user.
531
+
-`env_var_name`: The name of the environment variable that is being set using the form field.
532
+
-`value`: This is the default value of the form field. It will be shown in the UIas such unless the user changes it.
533
+
-`title`: This is the title of the form field in the UI.
534
+
-`description`: This is the description of the form field in the UI.
535
+
-`required`: This is a boolean that specifies if the form field is required.
536
+
-`type`: This is the type of the form field. Options are:
537
+
-`text`: Environment variable is a string so user inputs text in form field.
538
+
-`select`: User selects one option from the dropdown. You must provide the `options` key value pair after typeif using this.
539
+
-`toggle`: User toggles between true and false.
540
+
-`number`: User inputs a number in the form field.
541
+
-`options`: Specify the options the user can select fromif the typeis`select`. DONOT include this unless the `type`is`select`.
542
+
-`versions`: This is where you call the form fields specified in`schema`and organize them into categories.
543
+
-`imageName`: This is the name of the Docker image that will be used to run the serverless endpoint.
544
+
-`minimumCudaVersion`: This is the minimum CUDA version that is required to run the serverless endpoint.
545
+
-`categories`: This is where you call the keys of the form fields specified in`schema`and organize them into categories. Each category is a toggle list of forms on the Web UI.
546
+
-`title`: This is the title of the category in the UI.
547
+
-`settings`: This is the array of settings schemas specified in`schema` associated with the category.
548
+
549
+
## Example of schema
550
+
```json
551
+
{
552
+
"schema": {
553
+
"TOKENIZER": {
554
+
"env_var_name": "TOKENIZER",
555
+
"value": "",
556
+
"title": "Tokenizer",
557
+
"description": "Name or path of the Hugging Face tokenizer to use.",
0 commit comments