chore: doctests fixes

This commit is contained in:
Per Stark
2024-12-02 09:18:03 +01:00
parent 20be3393d2
commit f1f5ce6236
2 changed files with 0 additions and 25 deletions

View File

@@ -30,23 +30,6 @@ use crate::storage::types::{knowledge_entity::KnowledgeEntity, StoredObject};
/// This function will return a `Error` if:
/// * The database query fails to execute
/// * The results cannot be deserialized into type `T`
///
/// # Example
///
/// ```rust
/// #[derive(serde::Deserialize)]
/// struct KnowledgeEntity {
/// id: String,
/// source_id: String,
/// // ... other fields
/// }
///
/// let results = find_entities_by_source_id::<KnowledgeEntity>(
/// "source123".to_string(),
/// "knowledge_entity".to_string(),
/// &db_client
/// ).await?;
/// ```
pub async fn find_entities_by_source_ids<T>(
source_id: Vec<String>,
table_name: String,

View File

@@ -25,14 +25,6 @@ use crate::error::ProcessingError;
/// * If the OpenAI API request fails
/// * If the request building fails
/// * If no embedding data is received in the response
///
/// # Example
///
/// ```rust
/// let client = async_openai::Client::new();
/// let text = String::from("Hello, world!");
/// let embedding = generate_embedding(&client, text).await?;
/// ```
pub async fn generate_embedding(
client: &async_openai::Client<async_openai::config::OpenAIConfig>,
input: String,