Skip to content

Commit 7b2bfa3

Browse files
authored
Merge pull request #797 from dcSpark/nico/fixes
WIP multiple fixes
2 parents bfbbedd + 4f3daf9 commit 7b2bfa3

File tree

25 files changed

+56057
-670
lines changed

25 files changed

+56057
-670
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,4 @@ shinkai-bin/shinkai-node/files/hispania_jina_es.vrkai
109109
storage_testing_debug_my_local_ai/
110110
output.txt
111111
file_aggregator.sh
112+
shinkai-libs/shinkai-sqlite/dumped_prompts.rs

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ members = [
1919
resolver = "2"
2020

2121
[workspace.package]
22-
version = "0.9.5"
22+
version = "0.9.6"
2323
edition = "2021"
2424
authors = ["Nico Arqueros <nico@shinkai.com>"]
2525

shinkai-bin/shinkai-node/src/llm_provider/execution/chains/generic_chain/generic_inference_chain.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,11 @@ impl GenericInferenceChain {
442442
// 6) Call workflow or tooling
443443
// Find the ShinkaiTool that has a tool with the function name
444444
let shinkai_tool = tools.iter().find(|tool| {
445-
tool.name() == function_call.name
445+
tool.internal_sanitized_name() == function_call.name
446446
|| tool.tool_router_key().to_string_without_version()
447447
== function_call.tool_router_key.clone().unwrap_or_default()
448448
});
449+
449450
if shinkai_tool.is_none() {
450451
eprintln!("Function not found: {}", function_call.name);
451452
return Err(LLMProviderError::FunctionNotFound(function_call.name.clone()));

shinkai-bin/shinkai-node/src/llm_provider/execution/chains/generic_chain/generic_prompts.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ impl JobPromptGenerator {
3333
function_call: Option<ToolCallFunctionResponse>,
3434
job_id: String,
3535
additional_files: Vec<String>,
36-
_node_env: NodeEnvironment,
37-
_db: Arc<SqliteManager>,
36+
_node_env: NodeEnvironment, // remove this
37+
_db: Arc<SqliteManager>, // remove this
3838
) -> Prompt {
3939
let mut prompt = Prompt::new();
4040

@@ -162,6 +162,9 @@ impl JobPromptGenerator {
162162
prompt.add_function_call_response(serde_json::to_value(function_call).unwrap(), 100);
163163
}
164164

165+
// eprintln!("prompt after adding function call: {:?}", prompt);
165166
prompt
166167
}
167168
}
169+
170+
// TODO: add tests

shinkai-bin/shinkai-node/src/llm_provider/providers/claude.rs

Lines changed: 624 additions & 236 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)