> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# prompts

## Module

Utility functions for prompt template operations.

## check\_name\_exists\_in\_organization

```python theme={null}
def check_name_exists_in_organization(name: str) -> bool
```

Check if a prompt template name exists in the organization.

Enforces organization-wide uniqueness by checking global templates.

**Arguments**

* `name` (`str`): The template name to check.

**Returns**

* `bool`: True if the name exists, False otherwise.

## generate\_unique\_name

```python theme={null}
def generate_unique_name(base_name: str) -> str
```

Generate a unique template name by appending (N) if the base name exists.

Ensures organization-wide uniqueness by checking global templates.
Automatically increments the suffix until a unique name is found.

**Arguments**

* `base_name` (`str`): The desired template name.

**Raises**

* `ValueError`: If unable to generate a unique name after 1000 attempts.

**Returns**

* `str`: A unique name. Returns the original name if unique, otherwise appends (1), (2), etc.

**Examples**

* If "my-template" doesn't exist → returns "my-template"
* If "my-template" exists → returns "my-template (1)"
* If "my-template" and "my-template (1)" exist → returns "my-template (2)"
