Skip to content

Commit a286788

Browse files
committed
chore: removed trailing whitespace
1 parent 7291e77 commit a286788

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

llm/bedrock/src/conversions.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,7 @@ pub fn converse_output_to_complete_response(
331331
_ => {}
332332
}
333333
}
334-
335334
let metadata = converse_output_to_response_metadata(&response);
336-
337335
Ok(llm::CompleteResponse {
338336
// bedrock does not return an id as part of the response struct.
339337
// there may be one present in `additional_model_response_fields`
@@ -344,10 +342,8 @@ pub fn converse_output_to_complete_response(
344342
tool_calls,
345343
metadata,
346344
})
347-
348345
}
349346
}
350-
351347
}
352348

353349
fn bedrock_tool_use_to_llm_tool_call(tool: ToolUseBlock) -> Result<llm::ToolCall, llm::Error> {

llm/bedrock/src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@ impl ExtendedGuest for BedrockComponent {
6969
}
7070

7171
fn get_bedrock_client() -> Result<Arc<Bedrock>, llm::Error> {
72-
BEDROCK_CLIENT.with_borrow_mut(|client_opt| {
73-
if client_opt.is_none() {
74-
*client_opt = Some(Arc::new(Bedrock::new()?));
72+
BEDROCK_CLIENT.with_borrow_mut(|client_opt| match client_opt {
73+
Some(client) => Ok(client.clone()),
74+
None => {
75+
let client = Arc::new(Bedrock::new()?);
76+
*client_opt = Some(client.clone());
77+
Ok(client)
7578
}
76-
Ok(client_opt.as_ref().map(Arc::clone).unwrap())
7779
})
7880
}
7981

0 commit comments

Comments
 (0)