diff --git a/router/src/infer/chat_template.rs b/router/src/infer/chat_template.rs index a4997db75..725197acd 100644 --- a/router/src/infer/chat_template.rs +++ b/router/src/infer/chat_template.rs @@ -1181,6 +1181,7 @@ TOOL CALL ID: 0 "I'd like to show off how chat templating works!".to_string(), ), }, + tool_call_id: None, }, Message { name: None, @@ -1190,6 +1191,7 @@ TOOL CALL ID: 0 "Great! How can I help you today?".to_string(), ), }, + tool_call_id: None, }, Message { name: None, @@ -1197,6 +1199,7 @@ TOOL CALL ID: 0 body: MessageBody::Content { content: MessageContent::SingleText("Just testing".to_string()), }, + tool_call_id: None, }, ]; let tools_string = r#"[{"type": "function","function": {"name": "get_current_weather","description": "Get the current weather","parameters": {"type": "object","properties": {"location": {"type": "string","description": "The city and state, e.g. San Francisco, CA"},"format": {"type": "string","enum": ["celsius", "fahrenheit"],"description": "The temperature unit to use. Infer this from the users location."}},"required": ["location", "format"]}}}]"#.to_string(); @@ -1226,6 +1229,7 @@ TOOL CALL ID: 0 .to_string(), ), }, + tool_call_id: None, }, Message { name: None, @@ -1235,6 +1239,7 @@ TOOL CALL ID: 0 "What is the weather like in Brooklyn, New York?".to_string(), ), }, + tool_call_id: None, }, ]; let tools_string = r#"[{"type": "function","function": {"name": "get_current_weather","description": "Get the current weather","parameters": {"type": "object","properties": {"location": {"type": "string","description": "The city and state, e.g. San Francisco, CA"},"format": {"type": "string","enum": ["celsius", "fahrenheit"],"description": "The temperature unit to use. Infer this from the users location."}},"required": ["location", "format"]}}}]"#.to_string(); @@ -1305,6 +1310,7 @@ TOOL CALL ID: 0 text: "You are a helpful assistant.".to_string(), }]), }, + tool_call_id: None, }, Message { name: None, @@ -1332,6 +1338,7 @@ TOOL CALL ID: 0 }, ]), }, + tool_call_id: None, }, ]; diff --git a/router/src/lib.rs b/router/src/lib.rs index 8c37392c6..77b159c3a 100644 --- a/router/src/lib.rs +++ b/router/src/lib.rs @@ -1644,6 +1644,7 @@ mod tests { body: MessageBody::Content { content: MessageContent::SingleText("What is Deep Learning?".to_string()) }, + tool_call_id: None, } ); } @@ -1703,6 +1704,7 @@ mod tests { MessageChunk::ImageUrl { image_url: Url { url: "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rabbit.png".to_string() }}, ]), }, + tool_call_id: None, } ); } @@ -1717,7 +1719,8 @@ mod tests { MessageChunk::Text { text: "Whats in this image?".to_string() }, MessageChunk::ImageUrl { image_url: Url { url: "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rabbit.png".to_string() } } ]), - } + }, + tool_call_id: None }; let textmsg: TextMessage = message.into(); assert_eq!(textmsg.content, "Whats in this image?![](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rabbit.png)"); diff --git a/router/src/vertex.rs b/router/src/vertex.rs index e2ae9721b..c0978d314 100644 --- a/router/src/vertex.rs +++ b/router/src/vertex.rs @@ -175,6 +175,7 @@ mod tests { "What's Deep Learning?".to_string() ) }, + tool_call_id: None, },], max_tokens: Some(128), top_p: Some(0.95),