synaptic-lark 0.4.0

Feishu/Lark integration for Synaptic: document loader, Bitable tool, message tool
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use synaptic_lark::{LarkConfig, LarkVectorStore};

#[test]
fn constructor() {
    let store = LarkVectorStore::new(LarkConfig::new("cli", "secret"), "dataset_xxx");
    assert_eq!(store.dataset_id(), "dataset_xxx");
}

#[tokio::test]
async fn similarity_search_by_vector_unsupported() {
    use synaptic_core::VectorStore;
    let store = LarkVectorStore::new(LarkConfig::new("a", "b"), "ds");
    let result = store.similarity_search_by_vector(&[0.1f32, 0.2], 5).await;
    assert!(result.is_err());
    assert!(result.unwrap_err().to_string().contains("not supported"));
}