(text: impl Into<String>)
| 1566 | use tokio::sync::{mpsc, Barrier}; |
| 1567 | |
| 1568 | fn text_response(text: impl Into<String>) -> LlmResponse { |
| 1569 | LlmResponse { |
| 1570 | message: Message { |
| 1571 | role: "assistant".to_string(), |
| 1572 | content: vec![ContentBlock::Text { text: text.into() }], |
| 1573 | reasoning_content: None, |
| 1574 | }, |
| 1575 | usage: TokenUsage { |
| 1576 | prompt_tokens: 10, |
| 1577 | completion_tokens: 5, |
| 1578 | total_tokens: 15, |
| 1579 | cache_read_tokens: None, |
| 1580 | cache_write_tokens: None, |
| 1581 | }, |
| 1582 | stop_reason: Some("end_turn".to_string()), |
| 1583 | meta: None, |
| 1584 | } |
| 1585 | } |
| 1586 | |
| 1587 | fn pre_analysis_response(messages: &[Message]) -> LlmResponse { |
| 1588 | let prompt = last_text(messages); |
no outgoing calls