MCPcopy Create free account
hub / github.com/Pometry/Raphtory / vectorise_graph

Method vectorise_graph

raphtory-graphql/src/python/server/server.rs:146–164  ·  view source on GitHub ↗
(
        &self,
        py: Python,
        name: &str,
        embeddings: PyOpenAIEmbeddings,
        nodes: TemplateConfig,
        edges: TemplateConfig,
    )

Source from the content-addressed store, hash-verified

144 signature = (name, embeddings, nodes = TemplateConfig::Bool(true), edges = TemplateConfig::Bool(true))
145 )]
146 fn vectorise_graph(
147 &self,
148 py: Python,
149 name: &str,
150 embeddings: PyOpenAIEmbeddings,
151 nodes: TemplateConfig,
152 edges: TemplateConfig,
153 ) -> PyResult<()> {
154 let template = template_from_python(nodes, edges)?;
155 // allow threads just in case the embedding server is using the same python runtime
156 py.detach(|| {
157 block_on(async move {
158 self.0
159 .vectorise_graph(name, &template, embeddings.into())
160 .await?;
161 Ok(())
162 })
163 })
164 }
165
166 /// Vectorise all graphs in the server working directory.
167 ///

Callers

nothing calls this directly

Calls 3

template_from_pythonFunction · 0.85
block_onFunction · 0.85
intoMethod · 0.45

Tested by

no test coverage detected