bitrouter_core/models/language/
tool.rs1use crate::models::shared::{
2 provider::ProviderOptions,
3 types::{JsonSchema, JsonValue, Record},
4};
5
6#[derive(Debug, Clone)]
8pub enum LanguageModelTool {
9 Function {
11 name: String,
12 description: Option<String>,
13 input_schema: JsonSchema,
14 input_examples: Vec<LanguageModelFunctionToolInputExample>,
15 strict: Option<bool>,
16 provider_options: Option<ProviderOptions>,
18 },
19 Provider {
21 id: ProviderToolId,
22 name: String,
23 args: Record<String, JsonValue>,
24 provider_options: Option<ProviderOptions>,
26 },
27}
28
29#[derive(Debug, Clone)]
31pub struct LanguageModelFunctionToolInputExample {
32 pub input: JsonValue,
33}
34
35#[derive(Debug, Clone)]
37pub struct ProviderToolId {
38 pub provider_name: String,
39 pub tool_id: String,
40}