chore: remove broken googleSearch grounding and /v1/search endpoint
This commit is contained in:
@@ -68,6 +68,9 @@ pub struct StreamingAccumulator {
|
||||
pub api_provider: Option<String>,
|
||||
/// Captured function calls from Google's response.
|
||||
pub function_calls: Vec<CapturedFunctionCall>,
|
||||
/// Captured grounding metadata from Google Search grounding.
|
||||
/// Contains search queries, web results, and citations.
|
||||
pub grounding_metadata: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
impl StreamingAccumulator {
|
||||
@@ -137,6 +140,15 @@ impl StreamingAccumulator {
|
||||
info!(finish_reason = reason, "MITM: non-STOP finish reason");
|
||||
}
|
||||
}
|
||||
// Capture grounding metadata (Google Search grounding results)
|
||||
if let Some(gm) = candidate.get("groundingMetadata") {
|
||||
self.grounding_metadata = Some(gm.clone());
|
||||
debug!(
|
||||
has_search_queries = gm.get("searchEntryPoint").is_some(),
|
||||
has_web_results = gm.get("groundingChunks").is_some(),
|
||||
"MITM: captured grounding metadata"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
self.api_provider = Some("google".to_string());
|
||||
|
||||
Reference in New Issue
Block a user