(&self, _request: ChatRequest)
| 592 | } |
| 593 | |
| 594 | async fn chat(&self, _request: ChatRequest) -> Result<ChatResponse, ProviderError> { |
| 595 | Ok(ChatResponse { |
| 596 | id: "chat_mock".to_string(), |
| 597 | model: self.model.id.clone(), |
| 598 | choices: vec![Choice { |
| 599 | index: 0, |
| 600 | message: Message::assistant(self.title.clone()), |
| 601 | finish_reason: Some("stop".to_string()), |
| 602 | }], |
| 603 | usage: Some(Usage { |
| 604 | prompt_tokens: 10, |
| 605 | completion_tokens: 3, |
| 606 | total_tokens: 13, |
| 607 | cache_read_input_tokens: None, |
| 608 | cache_creation_input_tokens: None, |
| 609 | }), |
| 610 | }) |
| 611 | } |
| 612 | |
| 613 | async fn chat_stream(&self, _request: ChatRequest) -> Result<StreamResult, ProviderError> { |
| 614 | Ok(Box::pin(stream::empty())) |
no test coverage detected