Skip to content

Commit

Permalink
Merge pull request #750 from dcSpark/fix/save-embeddings-in-tool_data
Browse files Browse the repository at this point in the history
Fix/save embeddings in tool data
  • Loading branch information
guillevalin authored Dec 23, 2024
2 parents 096ad6f + 5ce8af3 commit 664c399
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shinkai-libs/shinkai-sqlite/src/shinkai_tool_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use keyphrases::KeyPhraseExtractor;
use rusqlite::{params, Result};
use shinkai_tools_primitives::tools::shinkai_tool::{ShinkaiTool, ShinkaiToolHeader};
use std::collections::HashSet;
use shinkai_vector_resources::embeddings::Embedding;

impl SqliteManager {
// Adds a ShinkaiTool entry to the shinkai_tools table
Expand Down Expand Up @@ -44,6 +45,7 @@ impl SqliteManager {

// Clone the tool to make it mutable
let mut tool_clone = tool.clone();
tool_clone.set_embedding(Embedding::new("", embedding.clone()));

// Determine if the tool can be enabled
let is_enabled = tool_clone.is_enabled() && tool_clone.can_be_enabled();
Expand Down

0 comments on commit 664c399

Please sign in to comment.