File tree Expand file tree Collapse file tree 2 files changed +7
-21
lines changed
rullm-core/src/providers/google Expand file tree Collapse file tree 2 files changed +7
-21
lines changed Original file line number Diff line number Diff line change @@ -12,19 +12,12 @@ use std::pin::Pin;
1212
1313/// Simple configuration for CLI adapter
1414#[ derive( Debug , Clone ) ]
15+ #[ derive( Default ) ]
1516pub struct CliConfig {
1617 pub temperature : Option < f32 > ,
1718 pub max_tokens : Option < u32 > ,
1819}
1920
20- impl Default for CliConfig {
21- fn default ( ) -> Self {
22- Self {
23- temperature : None ,
24- max_tokens : None ,
25- }
26- }
27- }
2821
2922/// CLI adapter enum that wraps concrete provider clients
3023pub enum CliClient {
@@ -347,18 +340,11 @@ impl CliClient {
347340 let stream = client. messages_stream ( request) . await ?;
348341 Ok ( Box :: pin ( stream. filter_map ( |event_result| async move {
349342 match event_result {
350- Ok ( event) => match event {
351- rullm_core:: providers:: anthropic:: StreamEvent :: ContentBlockDelta {
352- delta,
353- ..
354- } => match delta {
355- rullm_core:: providers:: anthropic:: Delta :: TextDelta { text } => {
356- Some ( Ok ( text) )
357- }
358- _ => None ,
359- } ,
360- _ => None ,
361- } ,
343+ Ok ( rullm_core:: providers:: anthropic:: StreamEvent :: ContentBlockDelta {
344+ delta : rullm_core:: providers:: anthropic:: Delta :: TextDelta { text } ,
345+ ..
346+ } ) => Some ( Ok ( text) ) ,
347+ Ok ( _) => None ,
362348 Err ( e) => Some ( Err ( e) ) ,
363349 }
364350 } ) ) )
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ impl GoogleClient {
186186 . filter_map ( |m| {
187187 m. get ( "name" )
188188 . and_then ( |v| v. as_str ( ) )
189- . map ( |s| s. split ( '/' ) . last ( ) . unwrap_or ( s) . to_string ( ) )
189+ . map ( |s| s. split ( '/' ) . next_back ( ) . unwrap_or ( s) . to_string ( ) )
190190 } )
191191 . collect ( ) ;
192192
You can’t perform that action at this time.
0 commit comments