Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 8b5fa338-9106-4734-abf0-e30d67044a90
management:
docChecksum: 774e507b2df4f671362defe668d4d0d6
docVersion: 1.0.39
speakeasyVersion: 1.335.0
generationVersion: 2.370.2
releaseVersion: 0.24.1
configChecksum: 7ebed47354cd1fd023aebb9420561b04
docChecksum: c20db13bfb07ee6d97a80d72980a238c
docVersion: 1.0.41
speakeasyVersion: 1.348.1
generationVersion: 2.380.1
releaseVersion: 0.25.0
configChecksum: 6112a5356b8deb50b10d38a5e7e3bcd8
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
Expand All @@ -15,7 +15,7 @@ features:
python:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.3
core: 4.8.1
core: 4.8.4
examples: 2.81.3
globalSecurity: 2.83.5
globalSecurityCallbacks: 0.1.0
Expand Down Expand Up @@ -71,3 +71,4 @@ generatedFiles:
- src/unstructured_client/_hooks/sdkhooks.py
- src/unstructured_client/_hooks/types.py
- src/unstructured_client/_hooks/__init__.py
- CONTRIBUTING.md
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
speakeasyVersion: 1.335.0
speakeasyVersion: 1.348.1
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:f10e0d137f19dffb5d454153726970d685470742c7a8d9371417d497011f39be
sourceBlobDigest: sha256:b90b7b4a3f5ad94dd55e1cbaa47ae166776a377cb529dde2e3f1996f7789dbda
sourceRevisionDigest: sha256:f6db3da28a6004b2ea693aaf918e6e18ee9e2b6c5c4cae993fe02ebdd7ac324d
sourceBlobDigest: sha256:81bfa48cb6f236c114c84a4defe907ea07e1a87b12797274112e754dd847c324
tags:
- latest
- main
targets:
unstructured-python:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:f10e0d137f19dffb5d454153726970d685470742c7a8d9371417d497011f39be
sourceBlobDigest: sha256:b90b7b4a3f5ad94dd55e1cbaa47ae166776a377cb529dde2e3f1996f7789dbda
sourceRevisionDigest: sha256:f6db3da28a6004b2ea693aaf918e6e18ee9e2b6c5c4cae993fe02ebdd7ac324d
sourceBlobDigest: sha256:81bfa48cb6f236c114c84a4defe907ea07e1a87b12797274112e754dd847c324
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
Expand Down
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing to This Repository

Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements.

## How to Report Issues

If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes:

- A clear and descriptive title
- Steps to reproduce the issue
- Expected and actual behavior
- Any relevant logs, screenshots, or error messages
- Information about your environment (e.g., operating system, software versions)
- For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed

## Issue Triage and Upstream Fixes

We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code.

## Contact

If you have any questions or need further assistance, please feel free to reach out by opening an issue.

Thank you for your understanding and cooperation!

The Maintainers
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,12 @@ res = s.general.partition(request=operations.PartitionRequest(
content='0x2cC94b2FEF'.encode(),
file_name='your_file_here',
),
chunking_strategy=shared.ChunkingStrategy.BY_TITLE,
split_pdf_page_range=[
1,
10,
],
strategy=shared.Strategy.AUTO,
strategy=shared.Strategy.HI_RES,
),
),
RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False))
Expand Down Expand Up @@ -164,11 +165,12 @@ res = s.general.partition(request=operations.PartitionRequest(
content='0x2cC94b2FEF'.encode(),
file_name='your_file_here',
),
chunking_strategy=shared.ChunkingStrategy.BY_TITLE,
split_pdf_page_range=[
1,
10,
],
strategy=shared.Strategy.AUTO,
strategy=shared.Strategy.HI_RES,
),
))

Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,4 +584,14 @@ Based on:
### Generated
- [python v0.24.1] .
### Releases
- [PyPI v0.24.1] https://pypi.org/project/unstructured-client/0.24.1 - .
- [PyPI v0.24.1] https://pypi.org/project/unstructured-client/0.24.1 - .

## 2024-07-29 22:30:13
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.348.1 (2.380.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.25.0] .
### Releases
- [PyPI v0.25.0] https://pypi.org/project/unstructured-client/0.25.0 - .
3 changes: 2 additions & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ res = s.general.partition(request=operations.PartitionRequest(
content='0x2cC94b2FEF'.encode(),
file_name='your_file_here',
),
chunking_strategy=shared.ChunkingStrategy.BY_TITLE,
split_pdf_page_range=[
1,
10,
],
strategy=shared.Strategy.AUTO,
strategy=shared.Strategy.HI_RES,
),
))

Expand Down
6 changes: 3 additions & 3 deletions _test_unstructured_client/unit/test_custom_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_unit_retry_with_backoff_does_retry(caplog):

with requests_mock.Mocker() as mock:
# mock a 500 status code for POST requests to the api
mock.post("https://api.unstructured.io/general/v0/general", status_code=500)
mock.post("https://api.unstructuredapp.io/general/v0/general", status_code=500)
session = UnstructuredClient(api_key_auth=FAKE_KEY)

with open(filename, "rb") as f:
Expand Down Expand Up @@ -55,7 +55,7 @@ def test_unit_backoff_strategy_logs_retries_5XX(status_code: int, caplog):

with requests_mock.Mocker() as mock:
# mock a 500/503 status code for POST requests to the api
mock.post("https://api.unstructured.io/general/v0/general", status_code=status_code)
mock.post("https://api.unstructuredapp.io/general/v0/general", status_code=status_code)
session = UnstructuredClient(api_key_auth=FAKE_KEY)

with open(filename, "rb") as f:
Expand All @@ -81,7 +81,7 @@ def test_unit_backoff_strategy_logs_retries_connection_error(caplog):
)
with requests_mock.Mocker() as mock:
# mock a connection error response to POST request
mock.post("https://api.unstructured.io/general/v0/general", exc=requests.exceptions.ConnectionError)
mock.post("https://api.unstructuredapp.io/general/v0/general", exc=requests.exceptions.ConnectionError)
session = UnstructuredClient(api_key_auth=FAKE_KEY)

with open(filename, "rb") as f:
Expand Down
1 change: 1 addition & 0 deletions codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ actions:
content='0x2cC94b2FEF'.encode(),
),
strategy=shared.Strategy.AUTO,
chunking_strategy=shared.ChunkingStrategy.BASIC,
split_pdf_page_range=[
1,
10,
Expand Down
2 changes: 1 addition & 1 deletion docs/models/shared/partitionparameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `files` | [shared.Files](../../models/shared/files.md) | :heavy_check_mark: | The file to extract | |
| `chunking_strategy` | [Optional[shared.ChunkingStrategy]](../../models/shared/chunkingstrategy.md) | :heavy_minus_sign: | Use one of the supported strategies to chunk the returned elements after partitioning. When 'chunking_strategy' is not specified, no chunking is performed and any other chunking parameters provided are ignored. Supported strategies: 'basic', 'by_page', 'by_similarity', or 'by_title' | |
| `chunking_strategy` | [Optional[shared.ChunkingStrategy]](../../models/shared/chunkingstrategy.md) | :heavy_minus_sign: | Use one of the supported strategies to chunk the returned elements after partitioning. When 'chunking_strategy' is not specified, no chunking is performed and any other chunking parameters provided are ignored. Supported strategies: 'basic', 'by_page', 'by_similarity', or 'by_title' | by_title |
| `combine_under_n_chars` | *Optional[int]* | :heavy_minus_sign: | If chunking strategy is set, combine elements until a section reaches a length of n chars. Default: 500 | |
| `coordinates` | *Optional[bool]* | :heavy_minus_sign: | If `True`, return coordinates for each element extracted via OCR. Default: `False` | |
| `encoding` | *Optional[str]* | :heavy_minus_sign: | The encoding method used to decode the text input. Default: utf-8 | |
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

import setuptools
import re
Expand All @@ -19,7 +19,7 @@

setuptools.setup(
name='unstructured-client',
version='0.24.1',
version='0.25.0',
author='Unstructured',
description='Python Client SDK for Unstructured API',
license = 'MIT',
Expand Down
Loading