mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-09 23:25:58 +00:00
updated qdrant
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
fa36b672f1
commit
0cc625560d
4 changed files with 3 additions and 12 deletions
|
@ -41,7 +41,7 @@ class ChunkMetadata(BaseModel):
|
|||
:param metadata_token_count: The number of tokens in the metadata of the chunk.
|
||||
"""
|
||||
|
||||
chunk_id: str = None
|
||||
chunk_id: str | None = None
|
||||
document_id: str | None = None
|
||||
source: str | None = None
|
||||
created_timestamp: int | None = None
|
||||
|
|
|
@ -71,12 +71,8 @@ class QdrantIndex(EmbeddingIndex):
|
|||
)
|
||||
|
||||
points = []
|
||||
for i, (chunk, embedding) in enumerate(zip(chunks, embeddings, strict=False)):
|
||||
chunk_id = (
|
||||
f"{chunk.metadata.get('document_id')}:chunk-{i}"
|
||||
if chunk.metadata
|
||||
else f"{chunk.chunk_metadata.document_id}:chunk-{i}"
|
||||
)
|
||||
for _i, (chunk, embedding) in enumerate(zip(chunks, embeddings, strict=False)):
|
||||
chunk_id = chunk.chunk_id
|
||||
points.append(
|
||||
PointStruct(
|
||||
id=convert_id(chunk_id),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue