The Version Service in the Galtea SDK allows you to manage different iterations of your products through versions. This Service is exposed by the galtea.versions object and we will further explore its API down below.

Remember that we will be using the galtea object. More information here.

Create Version

This method allows you to create a version for your product.

version = galtea.versions.create(
    name="v1.0",
    product_id="YOUR_PRODUCT_ID",
    optional_props={"description": "Initial version with basic summarization capabilities"}
)
name
string
required

The name of the version.

product_id
string
required

The ID of the product you want to create a version for.

optional_props
dict[str, str]

Additional properties for the version, possible keys include:

  • dataset_description: Description of the dataset used
  • dataset_uri: URI to the dataset
  • description: Version description
  • endpoint: API endpoint of the version
  • model_id: The id of the model used in the version. The models are listed in the model’s page of the platform.
  • guardrails: Guardrails configuration
  • system_prompt: The system prompt used for this version

Listing Versions

This method allows you to list all versions associated with a specific product.

versions = galtea.versions.list(product_id="YOUR_PRODUCT_ID")
product_id
string
required

The ID of the product for which you want to list versions.

offset
int

The number of versions to skip before starting to collect the result set.

limit
int

The maximum number of versions to return.

Retrieving Version

This method allows you to retrieve a specific version by its ID.

version = galtea.versions.get(version_id="YOUR_VERSION_ID")
version_id
string
required

The ID of the version you want to retrieve.

Retrieving Version By Name

This method allows you to retrieve a specific version by its name.

galtea.versions.get_by_name(product_id="YOUR_PRODUCT_ID", name="YOUR_VERSION_NAME")
product_id
string
required

The ID of the product for which you want to retrieve the version.

name
string
required

The name of the version you want to retrieve.

Deleting Version

This method allows you to delete a specific version by its ID.

galtea.versions.delete(version_id="YOUR_VERSION_ID")
version_id
string
required

The ID of the version you want to delete.