You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vector encoding provider AzureOpenAI is not supported in genai.vector.encode.
Error message encountered:
ClientError: {code: Neo.ClientError.Procedure.ProcedureCallFailed} {message: Failed to invoke function `genai.vector.encode`: Caused by: java.lang.RuntimeException: Vector encoding provider not supported: AzureOpenAI}
When calling:
# Call on VScode where kg is an instance of my Neo4jGraph`
kg.query("""
MATCH (chunk:Chunk)
WHERE chunk.textEmbedding IS NULL
WITH chunk, genai.vector.encode(
chunk.text,
"AzureOpenAI",
{
token: $openAiApiKey,
resources: $resource,
deployment: $deployment
}
) AS vector
CALL db.create.setNodeVectorProperty(chunk, "textEmbedding", vector)
""",
params={"openAiApiKey":OPENAI_API_KEY, "resource":RESOURCE, "deployment":DEPLOYMENT})
# Call on Neo4j Desktop App
MATCH (chunk:Chunk)
WHERE chunk.textEmbedding IS NULL
WITH chunk, genai.vector.encode(
chunk.text,
"AzureOpenAI",
{
token: xxxxx,
resources: xxxxx
deployment: "embedding"
}
) AS vector
CALL db.create.setNodeVectorProperty(chunk, "textEmbedding", vector)
I have checked the version of my Neo4j and Apoc and met the requirements for both. My database on VScode has been successfully connected and the rest of the queries work as normal, e.g. MATCH (n) RETURN n on Desktop App, print(kg.schema) on VScode. The initialisation on VScode is done by calling method provided by langchain:
from langchain_community.graphs import Neo4jGraph
kg = Neo4jGraph(
url=NEO4J_URI, username=NEO4J_USERNAME, password=NEO4J_PASSWORD, database=NEO4J_DATABASE
)
Neo4j version: 5.18.1
Edition: enterprise
Operating system: MacOS Sonoma 14.1
API/Driver: both VSCode and Neo4j desktop App
The text was updated successfully, but these errors were encountered:
pangyyen
changed the title
ClientError: {code: Neo.ClientError.Procedure.ProcedureCallFailed} {message: Failed to invoke function genai.vector.encode: Caused by: java.lang.RuntimeException: Vector encoding provider not supported: AzureOpenAI}
Vector encoding provider AzureOpenAI is not supported under genai.vector.encode
May 20, 2024
Hey @pangyyen that really is odd.
I've just pulled 5.18.1 directly from the source we provide, and installed the GenAI plugin by moving from products to plugins.
When running the genai.vector.encode function with dummy values for 'AzureOpenAI' (as I currently don't have an Azure deployment running), I am getting parameter validation issues on those dummy values that could only be returned to me if the Azure OpenAI provider was correctly detected. So for me, it seems to be working.
As silly as it sounds could you triple-check check you are sending the request to a cluster member that is running the Neo4j 5.18.1 enterprise binary, and that the version of the GenAI plugin running within those members are also 5.18.1.
The JAR should be plugins/neo4j-genai-plugin-5.18.1.jar by default.
Please check all cluster members, just in case the one that is getting the request is running an older binary version.
Vector encoding provider
AzureOpenAI
is not supported ingenai.vector.encode
.Error message encountered:
When calling:
I have checked the version of my Neo4j and Apoc and met the requirements for both. My database on VScode has been successfully connected and the rest of the queries work as normal, e.g.
MATCH (n) RETURN n
on Desktop App,print(kg.schema)
on VScode. The initialisation on VScode is done by calling method provided by langchain:The text was updated successfully, but these errors were encountered: