(
&self,
py: Python,
embeddings: PyOpenAIEmbeddings,
nodes: TemplateConfig,
edges: TemplateConfig,
)
| 176 | signature = (embeddings, nodes = TemplateConfig::Bool(true), edges = TemplateConfig::Bool(true)) |
| 177 | )] |
| 178 | fn vectorise_all_graphs( |
| 179 | &self, |
| 180 | py: Python, |
| 181 | embeddings: PyOpenAIEmbeddings, |
| 182 | nodes: TemplateConfig, |
| 183 | edges: TemplateConfig, |
| 184 | ) -> PyResult<()> { |
| 185 | let template = template_from_python(nodes, edges)?; |
| 186 | // allow threads just in case the embedding server is using the same python runtime |
| 187 | py.detach(|| { |
| 188 | block_on(async move { |
| 189 | self.0 |
| 190 | .vectorise_all_graphs(&template, embeddings.into()) |
| 191 | .await?; |
| 192 | Ok(()) |
| 193 | }) |
| 194 | }) |
| 195 | } |
| 196 | |
| 197 | /// Start the server and return a handle to it. |
| 198 | /// |
nothing calls this directly
no test coverage detected