From 37be8805f44ae320890b220e7c1a02a2edd88d33 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Tue, 19 Aug 2025 14:47:03 -0400 Subject: [PATCH] ruff --- src/pipecat/services/google/llm_openai.py | 6 +++--- src/pipecat/services/openai/base_llm.py | 9 ++++----- src/pipecat/services/sambanova/llm.py | 6 +++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/pipecat/services/google/llm_openai.py b/src/pipecat/services/google/llm_openai.py index 59d1e0c1a..5367d7380 100644 --- a/src/pipecat/services/google/llm_openai.py +++ b/src/pipecat/services/google/llm_openai.py @@ -81,9 +81,9 @@ class GoogleLLMOpenAIBetaService(OpenAILLMService): await self.start_ttfb_metrics() - chunk_stream: AsyncStream[ChatCompletionChunk] = await self._stream_chat_completions_specific_context( - context - ) + chunk_stream: AsyncStream[ + ChatCompletionChunk + ] = await self._stream_chat_completions_specific_context(context) async for chunk in chunk_stream: if chunk.usage: diff --git a/src/pipecat/services/openai/base_llm.py b/src/pipecat/services/openai/base_llm.py index 3fdd6ee8f..3903b6c98 100644 --- a/src/pipecat/services/openai/base_llm.py +++ b/src/pipecat/services/openai/base_llm.py @@ -213,16 +213,15 @@ class BaseOpenAILLMService(LLMService): chunks = await self._client.chat.completions.create(**params) return chunks - def build_chat_completion_params( - self, params_from_context: OpenAILLMInvocationParams - ) -> dict: + def build_chat_completion_params(self, params_from_context: OpenAILLMInvocationParams) -> dict: """Build parameters for chat completion request. Subclasses can override this to customize parameters for different providers. Args: - context: The LLM context containing tools and configuration. - messages: List of chat completion messages to send. + params_from_context: Parameters, derived from the LLM context, to + use for the chat completion. Contains messages, tools, and tool + choice. Returns: Dictionary of parameters for the chat completion request. diff --git a/src/pipecat/services/sambanova/llm.py b/src/pipecat/services/sambanova/llm.py index 72ca5b8fb..d39eb51a2 100644 --- a/src/pipecat/services/sambanova/llm.py +++ b/src/pipecat/services/sambanova/llm.py @@ -122,9 +122,9 @@ class SambaNovaLLMService(OpenAILLMService): # type: ignore await self.start_ttfb_metrics() - chunk_stream: AsyncStream[ChatCompletionChunk] = await self._stream_chat_completions_specific_context( - context - ) + chunk_stream: AsyncStream[ + ChatCompletionChunk + ] = await self._stream_chat_completions_specific_context(context) async for chunk in chunk_stream: if chunk.usage: