Skip to content

Commit 2aaad04

Browse files
feat(api): update via SDK Studio (#41)
1 parent af8b47c commit 2aaad04

File tree

5 files changed

+26
-40
lines changed

5 files changed

+26
-40
lines changed

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Types:
44

55
```python
6-
from hyperspell.types import Document, DocumentStatus, DocumentListResponse
6+
from hyperspell.types import Document, DocumentStatus, Scores, DocumentListResponse
77
```
88

99
Methods:

src/hyperspell/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from .token import Token as Token
6+
from .scores import Scores as Scores
67
from .document import Document as Document
78
from .collection import Collection as Collection
89
from .document_status import DocumentStatus as DocumentStatus

src/hyperspell/types/document.py

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,23 @@
44
from datetime import datetime
55
from typing_extensions import Literal, TypeAlias
66

7+
from .scores import Scores
78
from .._models import BaseModel
89

910
__all__ = [
1011
"Document",
1112
"Section",
1213
"SectionSectionResult",
13-
"SectionSectionResultScores",
1414
"SectionSectionResultWithElements",
1515
"SectionSectionResultWithElementsElement",
1616
"SectionSectionResultWithElementsElementMetadata",
17-
"SectionSectionResultWithElementsScores",
1817
]
1918

2019

21-
class SectionSectionResultScores(BaseModel):
22-
full_text_search: Optional[float] = None
23-
"""How relevant the section is based on full text search"""
24-
25-
semantic_search: Optional[float] = None
26-
"""How relevant the section is based on vector search"""
27-
28-
weighted: Optional[float] = None
29-
"""The final weighted score of the section"""
30-
31-
3220
class SectionSectionResult(BaseModel):
3321
id: Optional[int] = None
3422

35-
scores: Optional[SectionSectionResultScores] = None
23+
scores: Optional[Scores] = None
3624

3725
text: Optional[str] = None
3826

@@ -69,23 +57,12 @@ class SectionSectionResultWithElementsElement(BaseModel):
6957
summary: Optional[str] = None
7058

7159

72-
class SectionSectionResultWithElementsScores(BaseModel):
73-
full_text_search: Optional[float] = None
74-
"""How relevant the section is based on full text search"""
75-
76-
semantic_search: Optional[float] = None
77-
"""How relevant the section is based on vector search"""
78-
79-
weighted: Optional[float] = None
80-
"""The final weighted score of the section"""
81-
82-
8360
class SectionSectionResultWithElements(BaseModel):
8461
id: Optional[int] = None
8562

8663
elements: Optional[List[SectionSectionResultWithElementsElement]] = None
8764

88-
scores: Optional[SectionSectionResultWithElementsScores] = None
65+
scores: Optional[Scores] = None
8966

9067
text: Optional[str] = None
9168

src/hyperspell/types/document_list_response.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
from datetime import datetime
55
from typing_extensions import Literal
66

7+
from .scores import Scores
78
from .._models import BaseModel
89

9-
__all__ = ["DocumentListResponse", "Section", "SectionElement", "SectionElementMetadata", "SectionScores"]
10+
__all__ = ["DocumentListResponse", "Section", "SectionElement", "SectionElementMetadata"]
1011

1112

1213
class SectionElementMetadata(BaseModel):
@@ -41,17 +42,6 @@ class SectionElement(BaseModel):
4142
summary: Optional[str] = None
4243

4344

44-
class SectionScores(BaseModel):
45-
full_text_search: Optional[float] = None
46-
"""How relevant the section is based on full text search"""
47-
48-
semantic_search: Optional[float] = None
49-
"""How relevant the section is based on vector search"""
50-
51-
weighted: Optional[float] = None
52-
"""The final weighted score of the section"""
53-
54-
5545
class Section(BaseModel):
5646
document_id: int
5747

@@ -65,7 +55,7 @@ class Section(BaseModel):
6555

6656
metadata: Optional[Dict[str, object]] = None
6757

68-
scores: Optional[SectionScores] = None
58+
scores: Optional[Scores] = None
6959

7060
text: Optional[str] = None
7161

src/hyperspell/types/scores.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import Optional
4+
5+
from .._models import BaseModel
6+
7+
__all__ = ["Scores"]
8+
9+
10+
class Scores(BaseModel):
11+
full_text_search: Optional[float] = None
12+
"""How relevant the section is based on full text search"""
13+
14+
semantic_search: Optional[float] = None
15+
"""How relevant the section is based on vector search"""
16+
17+
weighted: Optional[float] = None
18+
"""The final weighted score of the section"""

0 commit comments

Comments
 (0)