Unstructured-IO / unstructured-api

Apache License 2.0
446 stars 101 forks source link

The Chipper model is not available for download. It can be accessed via the official hosted API #364

Closed typefox09 closed 5 months ago

typefox09 commented 5 months ago

Describe the bug When calling the paid unstructured api with chipper as model name, the following error is returned:

API error occurred: Status 400 {"detail":"The Chipper model is not available for download. It can be accessed via the official hosted API."}

The Chipper model is not available for download. It can be accessed via the official hosted API To Reproduce


from unstructured_client.models import shared
from unstructured_client.models.errors import SDKError
from unstructured.chunking.basic import chunk_elements
import time

s = UnstructuredClient(api_key_auth="<HIDDEN>",  
                       server_url="<HIDDEN>") 

filename = "./test.pdf"
file = open(filename, "rb")

req = shared.PartitionParameters(
    files=shared.Files(
        content=file.read(),
        file_name=filename,
    ),
    strategy="hi_res",
    hi_res_model_name="chipper",
    pdf_infer_table_structure=True,
    chunking_strategy="by_title"
)

start_time = time.time()  

try:
    res = s.general.partition(req)
    end_time = time.time() 
    print(f"Partition function took {end_time - start_time:.2f} seconds to execute")
    print(res.elements[0])
    breakpoint()
except SDKError as e:
    print(e)
awalker4 commented 5 months ago

Hi there - Chipper was undergoing some maintenance but it should be back in the api. It's currently at v3, so you can request it with hi_res_model_name set to chipper or chipperv3. Let me know if this is working for you!