mirror of
https://github.com/katanemo/plano.git
synced 2026-05-15 11:02:39 +02:00
cargo clippy (#660)
This commit is contained in:
parent
c75e7606f9
commit
ca95ffb63d
62 changed files with 1864 additions and 1187 deletions
|
|
@ -142,8 +142,7 @@ impl HttpContext for StreamContext {
|
|||
let last_user_prompt = match deserialized_body
|
||||
.messages
|
||||
.iter()
|
||||
.filter(|msg| msg.role == USER_ROLE)
|
||||
.last()
|
||||
.rfind(|msg| msg.role == USER_ROLE)
|
||||
{
|
||||
Some(content) => content,
|
||||
None => {
|
||||
|
|
@ -155,11 +154,8 @@ impl HttpContext for StreamContext {
|
|||
self.user_prompt = Some(last_user_prompt.clone());
|
||||
|
||||
// convert prompt targets to ChatCompletionTool
|
||||
let tool_calls: Vec<ChatCompletionTool> = self
|
||||
.prompt_targets
|
||||
.iter()
|
||||
.map(|(_, pt)| pt.into())
|
||||
.collect();
|
||||
let tool_calls: Vec<ChatCompletionTool> =
|
||||
self.prompt_targets.values().map(|pt| pt.into()).collect();
|
||||
|
||||
let mut metadata = deserialized_body.metadata.clone();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue