Skip to content

Commit a89a9e5

Browse files
author
ks-release-bot
committed
chore(release): regenerate ksapi v1.107.0 from ks-backend
1 parent 6f9adc9 commit a89a9e5

19 files changed

Lines changed: 34 additions & 9 deletions

‎docs/ChunkMetadata.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**polygons** | [**List[PolygonReference]**](PolygonReference.md) | List of bounding boxes in the source document for the chunk, potentially from multiple areas of multiple pages. | [optional]
1010
**s3_urls** | **List[str]** | Ordered s3:// URIs to visual assets for this chunk. Single-element for standard IMAGE/TABLE/HTML chunks, multi-element for multi-page single-chunk ingestion. | [optional]
11-
**summary** | **str** | LLM-generated summary of the chunk content. Used for TABLE and HTML chunks to enrich embedding text. | [optional]
11+
**summary** | **str** | LLM-generated summary of the chunk content. Used for TABLE and HTML chunks to enrich embedding text, and for JSON/YAML chunks (with summarize_for_embedding) as the sole dense embedding text. | [optional]
12+
**summarize_for_embedding** | **bool** | When True, this chunk's dense embedding is built from its LLM-generated summary (see summary) instead of its raw content. Set for parsed JSON/YAML single chunks so noisy structured text does not dominate the vector; the raw content is still kept for display and sparse (keyword) retrieval. Enrichment generates the summary when this is set and summary is empty. | [optional] [default to False]
1213
**extracted_text_s3_uri** | **str** | S3 URI to extracted PDF text used for LLM grounding during enrichment | [optional]
1314
**secondary_taxonomy** | [**ImageTaxonomy**](ImageTaxonomy.md) | | [optional]
1415
**sheet_name** | **str** | Worksheet name this chunk was extracted from (XLSX only) | [optional]

‎docs/DocumentType.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ Type of document.
1818

1919
* `PPTX` (value: `'PPTX'`)
2020

21+
* `JSON` (value: `'JSON'`)
22+
23+
* `YAML` (value: `'YAML'`)
24+
2125
* `UNKNOWN` (value: `'UNKNOWN'`)
2226

2327
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

‎ksapi/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "1.106.3"
17+
__version__ = "1.107.0"
1818

1919
# Define package exports
2020
__all__ = [

‎ksapi/api_client.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __init__(
9191
self.default_headers[header_name] = header_value
9292
self.cookie = cookie
9393
# Set default User-Agent.
94-
self.user_agent = 'OpenAPI-Generator/1.106.3/python'
94+
self.user_agent = 'OpenAPI-Generator/1.107.0/python'
9595
self.client_side_validation = configuration.client_side_validation
9696

9797
def __enter__(self):

‎ksapi/configuration.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ def to_debug_report(self) -> str:
562562
"OS: {env}\n"\
563563
"Python Version: {pyversion}\n"\
564564
"Version of the API: 0.1.0\n"\
565-
"SDK Package Version: 1.106.3".\
565+
"SDK Package Version: 1.107.0".\
566566
format(env=sys.platform, pyversion=sys.version)
567567

568568
def get_host_settings(self) -> List[HostSetting]:

‎ksapi/models/chunk_metadata.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import re # noqa: F401
1818
import json
1919

20-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
20+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
2121
from typing import Any, ClassVar, Dict, List, Optional
2222
from ksapi.models.image_taxonomy import ImageTaxonomy
2323
from ksapi.models.polygon_reference import PolygonReference
@@ -31,7 +31,8 @@ class ChunkMetadata(BaseModel):
3131
""" # noqa: E501
3232
polygons: Optional[List[PolygonReference]] = Field(default=None, description="List of bounding boxes in the source document for the chunk, potentially from multiple areas of multiple pages.")
3333
s3_urls: Optional[List[StrictStr]] = Field(default=None, description="Ordered s3:// URIs to visual assets for this chunk. Single-element for standard IMAGE/TABLE/HTML chunks, multi-element for multi-page single-chunk ingestion.")
34-
summary: Optional[StrictStr] = Field(default=None, description="LLM-generated summary of the chunk content. Used for TABLE and HTML chunks to enrich embedding text.")
34+
summary: Optional[StrictStr] = Field(default=None, description="LLM-generated summary of the chunk content. Used for TABLE and HTML chunks to enrich embedding text, and for JSON/YAML chunks (with summarize_for_embedding) as the sole dense embedding text.")
35+
summarize_for_embedding: Optional[StrictBool] = Field(default=False, description="When True, this chunk's dense embedding is built from its LLM-generated summary (see summary) instead of its raw content. Set for parsed JSON/YAML single chunks so noisy structured text does not dominate the vector; the raw content is still kept for display and sparse (keyword) retrieval. Enrichment generates the summary when this is set and summary is empty.")
3536
extracted_text_s3_uri: Optional[StrictStr] = Field(default=None, description="S3 URI to extracted PDF text used for LLM grounding during enrichment")
3637
secondary_taxonomy: Optional[ImageTaxonomy] = None
3738
sheet_name: Optional[StrictStr] = Field(default=None, description="Worksheet name this chunk was extracted from (XLSX only)")
@@ -44,7 +45,7 @@ class ChunkMetadata(BaseModel):
4445
key_cells: Optional[List[StrictStr]] = Field(default=None, description="Notable output/header cells as A1 refs, e.g. 'Sheet1!A1' (XLSX only)")
4546
named_ranges: Optional[List[StrictStr]] = Field(default=None, description="Names of named ranges overlapping this chunk (XLSX only)")
4647
additional_properties: Dict[str, Any] = {}
47-
__properties: ClassVar[List[str]] = ["polygons", "s3_urls", "summary", "extracted_text_s3_uri", "secondary_taxonomy", "sheet_name", "block_type", "source_uri", "enriched_html", "cell_range", "dependency_summary", "formulas", "key_cells", "named_ranges"]
48+
__properties: ClassVar[List[str]] = ["polygons", "s3_urls", "summary", "summarize_for_embedding", "extracted_text_s3_uri", "secondary_taxonomy", "sheet_name", "block_type", "source_uri", "enriched_html", "cell_range", "dependency_summary", "formulas", "key_cells", "named_ranges"]
4849

4950
model_config = ConfigDict(
5051
validate_by_name=True,
@@ -169,6 +170,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
169170
"polygons": [PolygonReference.from_dict(_item) for _item in obj["polygons"]] if obj.get("polygons") is not None else None,
170171
"s3_urls": obj.get("s3_urls"),
171172
"summary": obj.get("summary"),
173+
"summarize_for_embedding": obj.get("summarize_for_embedding") if obj.get("summarize_for_embedding") is not None else False,
172174
"extracted_text_s3_uri": obj.get("extracted_text_s3_uri"),
173175
"secondary_taxonomy": obj.get("secondary_taxonomy"),
174176
"sheet_name": obj.get("sheet_name"),

‎ksapi/models/document_type.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class DocumentType(str, Enum):
3333
XLSX = 'XLSX'
3434
CSV = 'CSV'
3535
PPTX = 'PPTX'
36+
JSON = 'JSON'
37+
YAML = 'YAML'
3638
UNKNOWN = 'UNKNOWN'
3739

3840
@classmethod

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ksapi"
3-
version = "1.106.3"
3+
version = "1.107.0"
44
description = "Knowledge Stack API"
55
authors = [
66
{name = "OpenAPI Generator Community",email = "team@openapitools.org"},

‎setup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# prerequisite: setuptools
2020
# http://pypi.python.org/pypi/setuptools
2121
NAME = "ksapi"
22-
VERSION = "1.106.3"
22+
VERSION = "1.107.0"
2323
PYTHON_REQUIRES = ">= 3.9"
2424
REQUIRES = [
2525
"urllib3 >= 2.1.0, < 3.0.0",

‎test/test_chunk_bulk_response.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def make_instance(self, include_optional) -> ChunkBulkResponse:
5454
''
5555
],
5656
summary = '',
57+
summarize_for_embedding = True,
5758
extracted_text_s3_uri = '',
5859
secondary_taxonomy = 'picture',
5960
sheet_name = '',
@@ -119,6 +120,7 @@ def make_instance(self, include_optional) -> ChunkBulkResponse:
119120
''
120121
],
121122
summary = '',
123+
summarize_for_embedding = True,
122124
extracted_text_s3_uri = '',
123125
secondary_taxonomy = 'picture',
124126
sheet_name = '',

0 commit comments

Comments
 (0)