Another remote for gh:zotero-rag/zotero-rag
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: elide lifetime in `send_message`

+14 -14
+2 -2
zqa-rag/src/llm/anthropic.rs
··· 326 326 impl<T: HttpClient> ApiClient for AnthropicClient<T> { 327 327 /// Send a request to the Anthropic API, processing tool calls as necessary. Returns a final 328 328 /// response after all tool calls are processed and sent back to the API. 329 - async fn send_message<'a>( 329 + async fn send_message( 330 330 &self, 331 - request: &'a ChatRequest<'a>, 331 + request: &ChatRequest<'_>, 332 332 ) -> Result<CompletionApiResponse, LLMError> { 333 333 // Use config if available, otherwise fall back to env vars 334 334 let (api_key, model, max_tokens) = if let Some(ref config) = self.config {
+2 -2
zqa-rag/src/llm/base.rs
··· 177 177 #[allow(async_fn_in_trait)] 178 178 pub trait ApiClient { 179 179 /// Send a request to the API and return the response. 180 - async fn send_message<'a>( 180 + async fn send_message( 181 181 &self, 182 - request: &'a ChatRequest<'a>, 182 + request: &ChatRequest<'_>, 183 183 ) -> Result<CompletionApiResponse, LLMError>; 184 184 }
+2 -2
zqa-rag/src/llm/factory.rs
··· 79 79 80 80 // Implement ApiClient for LLMClient to delegate to the inner implementations 81 81 impl ApiClient for LLMClient { 82 - async fn send_message<'a>( 82 + async fn send_message( 83 83 &self, 84 - message: &'a ChatRequest<'a>, 84 + message: &ChatRequest<'_>, 85 85 ) -> Result<crate::llm::base::CompletionApiResponse, LLMError> { 86 86 match self { 87 87 LLMClient::Anthropic(client) => client.send_message(message).await,
+2 -2
zqa-rag/src/llm/gemini.rs
··· 318 318 } 319 319 320 320 impl<T: HttpClient> ApiClient for GeminiClient<T> { 321 - async fn send_message<'a>( 321 + async fn send_message( 322 322 &self, 323 - request: &'a ChatRequest<'a>, 323 + request: &ChatRequest<'_>, 324 324 ) -> Result<CompletionApiResponse, LLMError> { 325 325 let key = get_gemini_api_key()?; 326 326 let model = match &self.config {
+2 -2
zqa-rag/src/llm/ollama.rs
··· 58 58 impl<T: HttpClient> ApiClient for OllamaClient<T> { 59 59 /// Send a request to the `ollama` API, processing tool calls as necessary. Returns a final 60 60 /// response after all tool calls are processed and sent back to the API. 61 - async fn send_message<'a>( 61 + async fn send_message( 62 62 &self, 63 - request: &'a ChatRequest<'a>, 63 + request: &ChatRequest<'_>, 64 64 ) -> Result<CompletionApiResponse, LLMError> { 65 65 // Use config if available, otherwise fall back to env vars 66 66 let (model, max_tokens, base_url) = if let Some(ref config) = self.config {
+2 -2
zqa-rag/src/llm/openai.rs
··· 493 493 /// Send a request to the OpenAI Responses API, processing tool calls as necessary. 494 494 /// Returns a final response after all tool calls are processed and sent back. 495 495 #[allow(clippy::too_many_lines)] 496 - async fn send_message<'a>( 496 + async fn send_message( 497 497 &self, 498 - request: &'a ChatRequest<'a>, 498 + request: &ChatRequest<'_>, 499 499 ) -> Result<CompletionApiResponse, super::errors::LLMError> { 500 500 // Use config if available, otherwise fall back to env vars 501 501 let (api_key, model, _) = if let Some(ref config) = self.config {
+2 -2
zqa-rag/src/llm/openrouter.rs
··· 322 322 impl<T: HttpClient> ApiClient for OpenRouterClient<T> { 323 323 /// Send a request to the OpenRouter API, processing tool calls as necessary. Returns a final 324 324 /// response after all tool calls are processed and sent back to the API. 325 - async fn send_message<'a>( 325 + async fn send_message( 326 326 &self, 327 - request: &'a ChatRequest<'a>, 327 + request: &ChatRequest<'_>, 328 328 ) -> Result<CompletionApiResponse, LLMError> { 329 329 // Use config if available, otherwise fall back to env vars 330 330 let (api_key, model) = if let Some(ref config) = self.config {