Struct weaviate_community::Modules
source · pub struct Modules { /* private fields */ }
Expand description
All contextionary module related endpoints and functionality described in Weaviate contextionary API documentation
Implementations§
source§impl Modules
impl Modules
sourcepub async fn contextionary_get_concept(
&self,
concept: &str
) -> Result<ContextionaryConcept, Box<dyn Error>>
pub async fn contextionary_get_concept( &self, concept: &str ) -> Result<ContextionaryConcept, Box<dyn Error>>
Get a concept from text2vec-contextionary.
§Parameter
- concept: the concept to search for
§Example
use weaviate_community::WeaviateClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = WeaviateClient::builder("http://localhost:8080").build()?;
let res = client.modules.contextionary_get_concept("concept").await;
Ok(())
}
sourcepub async fn contextionary_extend(
&self,
concept: ContextionaryExtension
) -> Result<ContextionaryExtension, Box<dyn Error>>
pub async fn contextionary_extend( &self, concept: ContextionaryExtension ) -> Result<ContextionaryExtension, Box<dyn Error>>
Extend text2vec-contextionary.
§Parameter
- concept: the concept to extend contextionary with
§Example
use weaviate_community::WeaviateClient;
use weaviate_community::collections::modules::ContextionaryExtension;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = WeaviateClient::builder("http://localhost:8080").build()?;
let ext = ContextionaryExtension::new("concept", "description", 1.0);
let res = client.modules.contextionary_extend(ext).await;
Ok(())
}
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Modules
impl Send for Modules
impl Sync for Modules
impl Unpin for Modules
impl !UnwindSafe for Modules
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more