Skip to content

Describe

azure_openai_description

azure_openai_description(content=None, metadata=None, image_url=None, max_characters=8000, system_prompt=None, api_key=None, azure_endpoint=None, api_version=None, model=None, max_retries=5)

Generates a description from the provided container content, metadata and image. Uses the Azure OpenAI service.

Parameters:

Name Type Description Default
content str

The main-body of the prompt

None
metadata dict

Any additional information describing the content

None
image_url str

A signed or public URL where an image can be found

None
max_characters int

Maximum number of text characters (excluding images) from content to be included in the prompt. Any additional characters are trimmed from content.

8000
system_prompt str

Overrides the default prompt

None
api_key str

Access key for the Azure OpenAI resource

None
azure_endpoint str

Your Azure endpoint, including the resource, e.g. https://example-resource.azure.openai.com/. if not provided will default to environment variable AZURE_OPENAI_ENDPOINT.

None
api_version str

API version for Azure resource.

None
model str

Model deployment name within the Azure resource. If not provided will default to environment variable AZURE_OPENAI_DEPLOYMENT.

None
max_retries int

Maximum number of unsuccessful call attempts to the OpenAI service before returning an error.

5

Returns:

Type Description
str

A plain-text description of the input content.

azure_openai_description_row

azure_openai_description_row(content=None, max_characters=8000, system_prompt=None, api_key=None, azure_endpoint=None, api_version=None, model=None, max_retries=5)

Generates a short (3-7 word) description from the provided string or dictionary. Expects the input to be a construction material, activity or other built environment related concept. Uses the Azure OpenAI service.

Parameters:

Name Type Description Default
content str | Dict

The main-body of the prompt

None
max_characters int

Maximum number of text characters from content to be included in the prompt. Any additional characters are trimmed from content.

8000
system_prompt str

Overrides the default prompt

None
api_key str

Access key for the Azure OpenAI resource

None
azure_endpoint str

Your Azure endpoint, including the resource, e.g. https://example-resource.azure.openai.com/. if not provided will default to environment variable AZURE_OPENAI_ENDPOINT.

None
api_version str

API version for Azure resource.

None
model str

Model deployment name within the Azure resource. If not provided will default to environment variable AZURE_OPENAI_DEPLOYMENT.

None
max_retries int

Maximum number of unsuccessful call attempts to the OpenAI service before returning an error.

5

Returns:

Type Description
str

A plain-text description of the input content.

content_list_generator

content_list_generator(text)

Generates a list of up to 10 key document 'atomic' themes, for the purpose of creating a spread of Uniclass (or other) classifications that describe a document.

Parameters:

Name Type Description Default
text str

Content of the document

required

Returns:

Type Description
List[str]

A markdown formatted list of themes