Skip to main content

fastskill_core/core/
tool_calling.rs

1//! Tool calling service implementation
2
3use crate::core::service::ServiceError;
4use async_trait::async_trait;
5use serde::{Deserialize, Serialize};
6
7#[derive(Debug, Clone, Serialize, Deserialize)]
8pub struct ToolResult {
9    pub success: bool,
10    // Add other fields as needed
11}
12
13#[derive(Debug, Clone, Serialize, Deserialize)]
14pub struct AvailableTool {
15    pub name: String,
16    pub description: String,
17    // Add other fields as needed
18}
19
20#[async_trait]
21pub trait ToolCallingService: Send + Sync {
22    async fn get_available_tools(&self) -> Result<Vec<AvailableTool>, ServiceError>;
23    // Add other methods as needed
24}
25
26pub struct ToolCallingServiceImpl;
27
28impl Default for ToolCallingServiceImpl {
29    fn default() -> Self {
30        Self::new()
31    }
32}
33
34impl ToolCallingServiceImpl {
35    pub fn new() -> Self {
36        Self
37    }
38}
39
40#[async_trait]
41impl ToolCallingService for ToolCallingServiceImpl {
42    async fn get_available_tools(&self) -> Result<Vec<AvailableTool>, ServiceError> {
43        Ok(vec![])
44    }
45}