[Router] Refactor protocol definitions: split spec.rs into modular files (#11677)
Co-authored-by: Chang Su <chang.s.su@oracle.com>
This commit is contained in:
@@ -2,7 +2,7 @@ use async_trait::async_trait;
|
||||
use regex::Regex;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
|
||||
use crate::tool_parser::{
|
||||
errors::{ParserError, ParserResult},
|
||||
|
||||
@@ -2,7 +2,7 @@ use async_trait::async_trait;
|
||||
use regex::Regex;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
|
||||
use crate::tool_parser::{
|
||||
errors::{ParserError, ParserResult},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use async_trait::async_trait;
|
||||
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
|
||||
use crate::tool_parser::{
|
||||
errors::ParserResult,
|
||||
|
||||
@@ -2,7 +2,7 @@ use async_trait::async_trait;
|
||||
use regex::Regex;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
|
||||
use crate::tool_parser::{
|
||||
errors::{ParserError, ParserResult},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use async_trait::async_trait;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
|
||||
use crate::tool_parser::{
|
||||
errors::{ParserError, ParserResult},
|
||||
|
||||
@@ -2,7 +2,7 @@ use async_trait::async_trait;
|
||||
use regex::Regex;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
|
||||
use crate::tool_parser::{
|
||||
errors::ParserResult,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use async_trait::async_trait;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
|
||||
use crate::tool_parser::{
|
||||
errors::{ParserError, ParserResult},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use async_trait::async_trait;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
|
||||
use crate::tool_parser::{
|
||||
errors::{ParserError, ParserResult},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//! tool call parsing should be performed. It simply returns the input text
|
||||
//! with no tool calls detected.
|
||||
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
use crate::tool_parser::errors::ParserResult;
|
||||
use crate::tool_parser::traits::ToolParser;
|
||||
use crate::tool_parser::types::{StreamingParseResult, ToolCall, ToolCallItem};
|
||||
|
||||
@@ -15,7 +15,7 @@ use rustpython_parser::{parse, Mode};
|
||||
use serde_json::{Map, Number, Value};
|
||||
use std::sync::OnceLock;
|
||||
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
|
||||
use crate::tool_parser::{
|
||||
errors::{ParserError, ParserResult},
|
||||
|
||||
@@ -2,7 +2,7 @@ use async_trait::async_trait;
|
||||
use regex::Regex;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
|
||||
use crate::tool_parser::{
|
||||
errors::{ParserError, ParserResult},
|
||||
|
||||
@@ -3,7 +3,7 @@ use regex::Regex;
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
|
||||
use crate::tool_parser::{
|
||||
errors::{ParserError, ParserResult},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::protocols::spec::Tool;
|
||||
use crate::protocols::common::Tool;
|
||||
use crate::tool_parser::{
|
||||
errors::ParserResult,
|
||||
types::{StreamingParseResult, ToolCall},
|
||||
|
||||
Reference in New Issue
Block a user