mirror of
https://github.com/katanemo/plano.git
synced 2026-06-23 15:38:07 +02:00
cargo clippy and fmt
This commit is contained in:
parent
0c6600ac47
commit
9758354e33
2 changed files with 13 additions and 10 deletions
|
|
@ -78,13 +78,13 @@ impl PipelineProcessor {
|
||||||
debug!("Received response from filter agent {}", agent_name);
|
debug!("Received response from filter agent {}", agent_name);
|
||||||
|
|
||||||
// Parse the response content as new message history
|
// Parse the response content as new message history
|
||||||
chat_completions_history = serde_json::from_str(&response_content).map_err(|err| {
|
chat_completions_history =
|
||||||
warn!(
|
serde_json::from_str(&response_content).inspect_err(|err| {
|
||||||
"Failed to parse response from agent {}, response: {}",
|
warn!(
|
||||||
agent_name, response_content
|
"Failed to parse response from agent {}, err: {}, response: {}",
|
||||||
);
|
agent_name, err, response_content
|
||||||
err
|
)
|
||||||
})?;
|
})?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(chat_completions_history)
|
Ok(chat_completions_history)
|
||||||
|
|
|
||||||
|
|
@ -79,9 +79,12 @@ impl RouterService {
|
||||||
trace_parent: Option<String>,
|
trace_parent: Option<String>,
|
||||||
usage_preferences: Option<Vec<ModelUsagePreference>>,
|
usage_preferences: Option<Vec<ModelUsagePreference>>,
|
||||||
) -> Result<Option<(String, String)>> {
|
) -> Result<Option<(String, String)>> {
|
||||||
if usage_preferences.is_none()
|
if messages.is_empty() {
|
||||||
|| usage_preferences.as_ref().unwrap().len() < 2
|
return Ok(None);
|
||||||
|| messages.is_empty()
|
}
|
||||||
|
|
||||||
|
if (usage_preferences.is_none() || usage_preferences.as_ref().unwrap().len() < 2)
|
||||||
|
&& !self.llm_usage_defined
|
||||||
{
|
{
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue