Find answers from the community

Home
Members
😀
�
😀
Offline, last seen 3 months ago
Joined September 25, 2024
Hey all, I’m facing an issue with getting the embeddings using SemanticSplitterNodeParser. The nodes are generated properly, but I can’t seem to get the embeddings! It’s returning None.

Plain Text
Settings.llm = OpenAI(model="gpt-4-0613")
Settings.embed_model = OpenAIEmbedding(model="text-embedding-3-small")

splitter = SemanticSplitterNodeParser(
    buffer_size=1,
    breakpoint_percentile_threshold=90,
    embed_model=Settings.embed_model
)

# Obtain nodes and embeddings from the documents
nodes = splitter.build_semantic_nodes_from_documents(documents)

# Extract embeddings from nodes
embeddings = [node.embedding for node in nodes]

embeddings


Output:
Plain Text
[None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None]


Does anyone have any idea why this is returning None? Is there something I’m missing here?
2 comments
L
Hey all, I’m facing an issue with getting the embeddings using SemanticSplitterNodeParser. The nodes are generated properly, but I can’t seem to get the embeddings! It’s returning None.

Plain Text
Settings.llm = OpenAI(model="gpt-4-0613")
Settings.embed_model = OpenAIEmbedding(model="text-embedding-3-small")

splitter = SemanticSplitterNodeParser(
    buffer_size=1,
    breakpoint_percentile_threshold=90,
    embed_model=Settings.embed_model
)

# Obtain nodes and embeddings from the documents
nodes = splitter.build_semantic_nodes_from_documents(documents)

# Extract embeddings from nodes
embeddings = [node.embedding for node in nodes]

embeddings


Output:
Plain Text
[None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None]


Does anyone have any idea why this is returning None? Is there something I’m missing here?
1 comment
W