Skip to main content
POST
/
generate_test_cases
Python
import os
from unstructured import UnstructuredClient

client = UnstructuredClient(
    username=os.environ.get("UNSTRUCTURED_USERNAME"),  # This is the default and can be omitted
    password=os.environ.get("UNSTRUCTURED_PASSWORD"),  # This is the default and can be omitted
)
response = client.tags.pattern.generate_test_cases(
    pattern_descriptions=["string"],
)
print(response.test_cases)
{
  "test_cases": [
    {
      "text": "<string>",
      "should_match": true,
      "category": "<string>",
      "actual_match": true,
      "validated": true,
      "expected_value": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.deasylabs.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
pattern_descriptions
string[]
required
existing_patterns
string[] | null
tag_name
string | null
tag_description
string | null
available_values
string[] | null
existing_positive_examples
string[] | null
existing_negative_examples
string[] | null
output_values
string[] | null
context_keywords
string[] | null

Response

Successful Response

test_cases
TestCase · object[]
required