(&self, chat_conversation_type: Option<ChatConversationType>)
| 640 | } |
| 641 | |
| 642 | fn make_metadata(&self, chat_conversation_type: Option<ChatConversationType>) -> RequestMetadata { |
| 643 | RequestMetadata { |
| 644 | request_id: self.response.request_id().map(String::from), |
| 645 | message_id: self.message_id.clone(), |
| 646 | time_to_first_chunk: self.time_to_first_chunk, |
| 647 | time_between_chunks: self.time_between_chunks.clone(), |
| 648 | response_size: self.received_response_size, |
| 649 | chat_conversation_type, |
| 650 | request_start_timestamp_ms: system_time_to_unix_ms(self.request_start_time_sys), |
| 651 | // We always end the stream when this method is called, so just set the end timestamp |
| 652 | // here. |
| 653 | stream_end_timestamp_ms: system_time_to_unix_ms(SystemTime::now()), |
| 654 | user_prompt_length: self.user_prompt_length, |
| 655 | message_meta_tags: self.message_meta_tags.clone(), |
| 656 | tool_use_ids_and_names: self |
| 657 | .tool_uses |
| 658 | .iter() |
| 659 | .map(|t| (t.id.clone(), t.name.clone())) |
| 660 | .collect::<_>(), |
| 661 | model_id: self.model_id.clone(), |
| 662 | } |
| 663 | } |
| 664 | } |
| 665 | |
| 666 | #[derive(Debug)] |
no test coverage detected