From 79cca05e432302ee52337a266ad538d723068086 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Thu, 26 Jun 2025 10:46:07 -0400 Subject: [PATCH] Update GroqLLMService docstrings --- src/pipecat/services/groq/llm.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/pipecat/services/groq/llm.py b/src/pipecat/services/groq/llm.py index be2ed5e72..e7edb4996 100644 --- a/src/pipecat/services/groq/llm.py +++ b/src/pipecat/services/groq/llm.py @@ -4,6 +4,8 @@ # SPDX-License-Identifier: BSD 2-Clause License # +"""Groq LLM Service implementation using OpenAI-compatible interface.""" + from loguru import logger from pipecat.services.openai.llm import OpenAILLMService @@ -16,10 +18,10 @@ class GroqLLMService(OpenAILLMService): maintaining full compatibility with OpenAI's interface and functionality. Args: - api_key (str): The API key for accessing Groq's API - base_url (str, optional): The base URL for Groq API. Defaults to "https://api.groq.com/openai/v1" - model (str, optional): The model identifier to use. Defaults to "llama-3.3-70b-versatile" - **kwargs: Additional keyword arguments passed to OpenAILLMService + api_key: The API key for accessing Groq's API. + base_url: The base URL for Groq API. Defaults to "https://api.groq.com/openai/v1". + model: The model identifier to use. Defaults to "llama-3.3-70b-versatile". + **kwargs: Additional keyword arguments passed to OpenAILLMService. """ def __init__( @@ -33,6 +35,15 @@ class GroqLLMService(OpenAILLMService): super().__init__(api_key=api_key, base_url=base_url, model=model, **kwargs) def create_client(self, api_key=None, base_url=None, **kwargs): - """Create OpenAI-compatible client for Groq API endpoint.""" + """Create OpenAI-compatible client for Groq API endpoint. + + Args: + api_key: API key for authentication. If None, uses instance api_key. + base_url: Base URL for the API. If None, uses instance base_url. + **kwargs: Additional arguments passed to the client constructor. + + Returns: + An OpenAI-compatible client configured for Groq's API. + """ logger.debug(f"Creating Groq client with api {base_url}") return super().create_client(api_key, base_url, **kwargs)