refactor: add openai client and improve reference handling

This commit is contained in:
Per Stark
2024-12-10 17:38:06 +01:00
parent cd7604c0ef
commit 1c4b3284bf
11 changed files with 121 additions and 88 deletions

View File

@@ -24,7 +24,7 @@ use crate::{error::ProcessingError, utils::embedding::generate_embedding};
/// * `T`: The type to deserialize the query results into. Must implement `serde::Deserialize`.
pub async fn find_items_by_vector_similarity<T>(
take: u8,
input_text: String,
input_text: &str,
db_client: &Surreal<Client>,
table: String,
openai_client: &async_openai::Client<async_openai::config::OpenAIConfig>,