Skip to content

Commit a022213

Browse files
committed
update chunk response
1 parent 638a3af commit a022213

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

jigsawstack/embedding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Chunk(TypedDict):
2424

2525
class EmbeddingResponse(BaseResponse):
2626
embeddings: List[List[float]]
27-
chunks: List[Chunk]
27+
chunks: Union[List[Chunk], List[str]]
2828

2929

3030
class Embedding(ClientConfig):

jigsawstack/embeddingV2.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typing import List, Union
66
from ._config import ClientConfig
77
from .helpers import build_path
8+
from .embedding import Chunk
89

910

1011
class EmbeddingV2Params(TypedDict):
@@ -20,12 +21,11 @@ class EmbeddingV2Params(TypedDict):
2021
class EmbeddingV2Response(TypedDict):
2122
success: bool
2223
embeddings: List[List[float]]
23-
chunks: List[str]
24+
chunks: Union[List[str], List[Chunk]]
2425
speaker_embeddings: List[List[float]]
2526

2627

2728
class EmbeddingV2(ClientConfig):
28-
2929
config: RequestConfig
3030

3131
def __init__(
@@ -80,7 +80,6 @@ def execute(
8080

8181

8282
class AsyncEmbeddingV2(ClientConfig):
83-
8483
config: RequestConfig
8584

8685
def __init__(

0 commit comments

Comments
 (0)