upgrade rust to 1.93.0 and fix pre-commit (#720)

This commit is contained in:
Adil Hafeez 2026-02-02 11:03:12 -08:00 committed by GitHub
parent 28a4242c6e
commit e41aa0a617
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 29 additions and 35 deletions

View file

@ -216,12 +216,12 @@ impl HttpContext for StreamContext {
("x-envoy-upstream-rq-timeout-ms", timeout_str.as_str()),
];
if self.request_id.is_some() {
headers.push((REQUEST_ID_HEADER, self.request_id.as_ref().unwrap()));
if let Some(request_id) = &self.request_id {
headers.push((REQUEST_ID_HEADER, request_id));
}
if self.traceparent.is_some() {
headers.push((TRACE_PARENT_HEADER, self.traceparent.as_ref().unwrap()));
if let Some(traceparent) = &self.traceparent {
headers.push((TRACE_PARENT_HEADER, traceparent));
}
let call_args = CallArgs::new(

View file

@ -183,8 +183,8 @@ impl StreamContext {
("x-envoy-upstream-rq-timeout-ms", timeout_str.as_str()),
];
if self.request_id.is_some() {
headers.push((REQUEST_ID_HEADER, self.request_id.as_ref().unwrap()));
if let Some(request_id) = &self.request_id {
headers.push((REQUEST_ID_HEADER, request_id));
}
let call_args = CallArgs::new(
@ -437,12 +437,12 @@ impl StreamContext {
.into_iter()
.collect();
if self.request_id.is_some() {
headers.insert(REQUEST_ID_HEADER, self.request_id.as_ref().unwrap());
if let Some(request_id) = &self.request_id {
headers.insert(REQUEST_ID_HEADER, request_id);
}
if self.traceparent.is_some() {
headers.insert(TRACE_PARENT_HEADER, self.traceparent.as_ref().unwrap());
if let Some(traceparent) = &self.traceparent {
headers.insert(TRACE_PARENT_HEADER, traceparent);
}
// override http headers that are set in the prompt target
@ -648,7 +648,15 @@ impl StreamContext {
}
pub fn generate_tool_call_message(&mut self) -> Message {
if self.arch_fc_response.is_none() {
if let Some(arch_fc_response) = &self.arch_fc_response {
Message {
role: ASSISTANT_ROLE.to_string(),
content: Some(ContentType::Text(arch_fc_response.clone())),
model: Some(ARCH_FC_MODEL_NAME.to_string()),
tool_calls: None,
tool_call_id: None,
}
} else {
info!("arch_fc_response is none, generating tool call message");
Message {
role: ASSISTANT_ROLE.to_string(),
@ -657,16 +665,6 @@ impl StreamContext {
tool_calls: self.tool_calls.clone(),
tool_call_id: None,
}
} else {
Message {
role: ASSISTANT_ROLE.to_string(),
content: Some(ContentType::Text(
self.arch_fc_response.as_ref().unwrap().clone(),
)),
model: Some(ARCH_FC_MODEL_NAME.to_string()),
tool_calls: None,
tool_call_id: None,
}
}
}