Skip to content

Commit

Permalink
- fix: json from rust to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
agallardol committed Nov 6, 2024
1 parent 4edae0f commit 69f5484
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/shinkai-tools-runner/src/tools/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ impl Tool {
max_execution_time_s: Option<u64>,
) -> Result<RunResult, ExecutionError> {
log::info!("preparing to run tool");
log::info!("configurations: {:?}", self.configurations);
log::info!("parameters: {:?}", parameters);
log::info!("configurations: {}", self.configurations.to_string());
log::info!("parameters: {}", parameters.to_string());

let mut deno_runner = DenoRunner::new(self.deno_runner_options.clone());
// Empty envs when get definition
Expand All @@ -94,8 +94,8 @@ impl Tool {
console.log("</shinkai-tool-result>");
"#,
&self.code.to_string(),
serde_json::to_string(&self.configurations).unwrap(),
serde_json::to_string(&parameters).unwrap(),
serde_json::to_string(&self.configurations).unwrap().replace("\\", "\\\\"),
serde_json::to_string(&parameters).unwrap().replace("\\", "\\\\"),
);
let result = deno_runner
.run(&code, envs, max_execution_time_s)
Expand Down

0 comments on commit 69f5484

Please sign in to comment.