Skip to content

Commit 5f51fe4

Browse files
fix: Update llmwv2 json schema for 0.53.1 (#122)
* Updated LLMW v2 related URLs, bumped version to 0.53.1, removed mentions of unused envs * Updated links to LLMW docs in LLMW v2 adapter fields
1 parent 8c4610f commit 5f51fe4

File tree

4 files changed

+12
-21
lines changed

4 files changed

+12
-21
lines changed

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,6 @@ unstract-sdk @ git+https://github.com/Zipstack/unstract-sdk@feature-branch
101101

102102
- Or try installing a [local PyPI server](https://pypi.org/project/pypiserver/) and upload / download your package from this server
103103

104-
### Environment variables required for various LLMs (deprecated)
105-
106-
- Azure OpenAI
107-
- `OPENAI_API_KEY`
108-
- `OPENAI_API_BASE`
109-
- `OPENAI_API_VERSION`
110-
- `OPENAI_API_ENGINE`
111-
- `OPENAI_API_MODEL`
112104

113105
### Documentation generation
114106

src/unstract/sdk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.53.0"
1+
__version__ = "0.53.1"
22

33

44
def get_sdk_version():

src/unstract/sdk/adapters/x2text/llm_whisperer_v2/src/static/json_schema.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
"type": "string",
1818
"title": "URL",
1919
"format": "uri",
20-
"default": "https://llmwhisperer-api.unstract.com",
21-
"description": "Provide the URL of the LLM Whisperer service."
20+
"default": "https://llmwhisperer-api.us-central.unstract.com",
21+
"description": "Provide the base URL of the LLM Whisperer service based on your region."
2222
},
2323
"unstract_key": {
2424
"type": "string",
2525
"title": "Unstract Key",
2626
"format": "password",
27-
"description": "API key obtained from the Unstract developer portal (https://us-central.unstract.com/llm-whisperer)"
27+
"description": "API key obtained from the Unstract developer portal (https://us-central.unstract.com/landing?selectedProduct=llm-whisperer)"
2828
},
2929
"mode": {
3030
"type": "string",
@@ -36,7 +36,7 @@
3636
"form"
3737
],
3838
"default": "form",
39-
"description": "Native text : Extract text from native text PDFs. (not scanned). Use this mode when: You have low latency requirement, All documents are PDFs, PDFs are native text PDFs, Cost sensitive application\n Low cost : Cost effective extraction. Use this mode when: High quality scanned PDFs, High quality scanned images, No handwritten documents \n High quality : High quality extraction. Use this mode when: Medium/low quality scanned PDFs, Medium/low quality scanned images, Handwritten documents \n Form: High quality extraction + Checkbox and Radio button detection. Use this mode when: Checkbox and radio button detection, Medium/low quality scanned PDFs, Medium/low quality scanned images, Handwritten documents."
39+
"description": "Processing mode to use, described in the LLM Whisperer documentation (https://docs.unstract.com/llmwhisperer/llm_whisperer/apis/llm_whisperer_text_extraction_api/#modes)."
4040
},
4141
"output_mode": {
4242
"type": "string",
@@ -46,7 +46,7 @@
4646
"text"
4747
],
4848
"default": "layout_preserving",
49-
"description": "The output format. Valid options are layout_preserving and text. Layout preserving mode tries to extract the text from the document as is, maintaining the structural layout of the document. This works very well for LLM consumption. Text (text) mode extracts the text from the document without applying any processing or intelligence. This mode is useful when the layout_preserving mode is not able to extract the text properly. This can happen if the document contains too many different fonts and font sizes."
49+
"description": "Output format, described in the LLM Whisperer documentation (https://docs.unstract.com/llmwhisperer/llm_whisperer/apis/llm_whisperer_text_extraction_api/#output-modes)"
5050
},
5151
"line_splitter_tolerance": {
5252
"type": "number",

src/unstract/sdk/llm.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,14 @@ def __init__(
3737
adapter_instance_id: Optional[str] = None,
3838
usage_kwargs: dict[Any, Any] = {},
3939
):
40-
"""
41-
42-
Notes:
43-
- "Azure OpenAI" : Environment variables required
44-
OPENAI_API_KEY,OPENAI_API_BASE, OPENAI_API_VERSION,
45-
OPENAI_API_ENGINE, OPENAI_API_MODEL
40+
"""Creates an instance of this LLM class.
4641
4742
Args:
48-
tool (AbstractTool): Instance of AbstractTool
43+
tool (BaseTool): Instance of BaseTool to expose function to stream logs
44+
adapter_instance_id (Optional[str], optional): UUID of the adapter in
45+
Unstract. Defaults to None.
46+
usage_kwargs (dict[Any, Any], optional): Dict to capture token usage with
47+
callbacks. Defaults to {}.
4948
"""
5049
self._tool = tool
5150
self._adapter_instance_id = adapter_instance_id

0 commit comments

Comments
 (0)