mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
update schema validate code and rename kind => type in agent_filter
This commit is contained in:
parent
387d6d1b58
commit
974141b539
6 changed files with 37 additions and 11 deletions
|
|
@ -14,10 +14,38 @@ properties:
|
|||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
url:
|
||||
type: string
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- url
|
||||
agent_filters:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
url:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- mcp
|
||||
transport:
|
||||
type: string
|
||||
enum:
|
||||
- streamable-http
|
||||
tool:
|
||||
type: string
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- url
|
||||
listeners:
|
||||
oneOf:
|
||||
- type: array
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ mod tests {
|
|||
fn create_test_agent_struct(name: &str) -> Agent {
|
||||
Agent {
|
||||
id: name.to_string(),
|
||||
kind: Some("test".to_string()),
|
||||
agent_type: Some("test".to_string()),
|
||||
url: "http://localhost:8080".to_string(),
|
||||
tool: None,
|
||||
transport: None,
|
||||
|
|
|
|||
|
|
@ -48,14 +48,14 @@ mod integration_tests {
|
|||
let agents = vec![
|
||||
Agent {
|
||||
id: "filter-agent".to_string(),
|
||||
kind: Some("filter".to_string()),
|
||||
agent_type: Some("filter".to_string()),
|
||||
url: "http://localhost:8081".to_string(),
|
||||
tool: None,
|
||||
transport: None,
|
||||
},
|
||||
Agent {
|
||||
id: "terminal-agent".to_string(),
|
||||
kind: Some("terminal".to_string()),
|
||||
agent_type: Some("terminal".to_string()),
|
||||
url: "http://localhost:8082".to_string(),
|
||||
tool: None,
|
||||
transport: None,
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@ mod tests {
|
|||
transport: None,
|
||||
tool: None,
|
||||
url: server_url,
|
||||
kind: None,
|
||||
agent_type: None,
|
||||
};
|
||||
|
||||
let messages = vec![create_test_message(Role::User, "Hello")];
|
||||
|
|
@ -616,7 +616,7 @@ mod tests {
|
|||
transport: None,
|
||||
tool: None,
|
||||
url: server_url,
|
||||
kind: None,
|
||||
agent_type: None,
|
||||
};
|
||||
|
||||
let messages = vec![create_test_message(Role::User, "Ping")];
|
||||
|
|
@ -668,7 +668,7 @@ mod tests {
|
|||
transport: None,
|
||||
tool: None,
|
||||
url: server_url,
|
||||
kind: None,
|
||||
agent_type: None,
|
||||
};
|
||||
|
||||
let messages = vec![create_test_message(Role::User, "Hi")];
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ pub struct Agent {
|
|||
pub transport: Option<String>,
|
||||
pub tool: Option<String>,
|
||||
pub url: String,
|
||||
pub kind: Option<String>,
|
||||
#[serde(rename = "type")]
|
||||
pub agent_type: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
|
|
|||
|
|
@ -9,14 +9,11 @@ agents:
|
|||
agent_filters:
|
||||
- id: query_rewriter
|
||||
url: http://host.docker.internal:10501
|
||||
# kind: mcp
|
||||
# type: mcp
|
||||
# transport: streamable-http
|
||||
# tool: query_rewriter
|
||||
- id: context_builder
|
||||
url: http://host.docker.internal:10502
|
||||
# kind: mcp
|
||||
# transport: streamable-http
|
||||
# tool: context_builder
|
||||
|
||||
model_providers:
|
||||
- model: openai/gpt-4o-mini
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue