Create changelog files for important commits in a PR
日本語の概要は準備中です。原文の説明を表示しています。
Review, refactor, document, and validate code changes in the current branch
インストールする前に、エージェントに与えられる指示の中身を確認できます。
The Code Cleanup Skill reviews, refactors, and documents code changes in your current branch, ensuring alignment with Pipecat's architecture, coding standards, and example patterns. It focuses on readability, correctness, performance, and consistency, while avoiding breaking changes.
This skill analyzes all changes introduced in your branch and performs the following actions:
07-interruptible.py)Invoke the skill using any of the following commands:
/cleanupThe skill retrieves all uncommitted changes and outgoing commits to understand:
Performance changes are conservative and non-breaking.
Documentation follows Google-style docstrings, consistent with Pipecat conventions.
class ExampleService:
"""Brief one-line description.
Detailed explanation of the class purpose, responsibilities,
and important behaviors.
Supported features:
- Feature 1
- Feature 2
- Feature 3
"""
def process_data(self, data: str, options: Optional[dict] = None) -> bool:
"""Process incoming data with optional configuration.
Args:
data: The input data to process.
options: Optional configuration dictionary.
Returns:
True if processing succeeded, False otherwise.
Raises:
ValueError: If data is empty or invalid.
"""
class InputParams(BaseModel):
"""Configuration parameters for the service.
Parameters:
timeout: Request timeout in seconds.
retry_count: Number of retry attempts.
enable_logging: Whether to enable debug logging.
"""
timeout: Optional[float] = None
retry_count: int = 3
enable_logging: bool = False
TTSService, STTService, LLMService)can_generate_metrics()Validated against examples/07-interruptible.py:
create_transport() usageclass ExampleTTSService(TTSService):
def __init__(self, *, api_key: Optional[str] = None, **kwargs):
super().__init__(**kwargs)
self._api_key = api_key or os.getenv("SERVICE_API_KEY")
def can_generate_metrics(self) -> bool:
return True
async def run_tts(self, text: str) -> AsyncGenerator[Frame, None]:
try:
await self.start_ttfb_metrics()
yield TTSStartedFrame()
# ... processing ...
frame = TTSAudioRawFrame(...)
await self.process_ttfa_metrics(frame)
yield frame
finally:
await self.stop_ttfb_metrics()
transport_params = {
"daily": lambda: DailyParams(...),
"twilio": lambda: FastAPIWebsocketParams(...),
"webrtc": lambda: TransportParams(...),
}
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
stt = DeepgramSTTService(...)
tts = SomeTTSService(...)
llm = OpenAILLMService(...)
context = LLMContext(messages)
user_aggregator, assistant_aggregator = LLMContextAggregatorPair(...)
pipeline = Pipeline([...])
worker = PipelineWorker(pipeline, params=..., observers=[...])
runner = WorkerRunner(handle_sigint=runner_args.handle_sigint)
await runner.add_workers(worker)
@transport.event_handler("on_client_connected")
async def on_client_connected(transport, client):
await worker.queue_frames([LLMRunFrame()])
@transport.event_handler("on_client_disconnected")
async def on_client_disconnected(transport, client):
await runner.cancel()
await runner.run()
async def bot(runner_args: RunnerArguments):
"""Main bot entry point compatible with Pipecat Cloud."""
transport = await create_transport(runner_args, transport_params)
await run_bot(transport, runner_args)
/prose-review branch over the comments and docstrings written above, and fix
anything it flagsdef get_audio_info(self) -> Tuple[int, int]:
return (48000, 1)
class AudioInfo:
"""Audio configuration information.
Parameters:
sample_rate: Sample rate in Hz.
num_channels: Number of audio channels.
"""
sample_rate: int
num_channels: int
def get_audio_info(self) -> AudioInfo:
return AudioInfo(sample_rate=48000, num_channels=1)
class NewTTSService(TTSService):
def __init__(self, api_key: str, voice: str):
self._api_key = api_key
self._voice = voice
class NewTTSService(TTSService):
"""Text-to-speech service using NewProvider API.
Streams PCM audio and emits TTSAudioRawFrame frames compatible
with Pipecat transports.
Supported features:
- Text-to-speech synthesis
- Streaming PCM audio
- Voice customization
- TTFB and TTFA metrics
"""
def __init__(self, *, api_key: str, voice: str, **kwargs):
"""Initialize the NewTTSService.
Args:
api_key: API key for authentication.
voice: Voice identifier to use.
**kwargs: Additional arguments passed to the parent service.
"""
super().__init__(**kwargs)
self._api_key = api_key
self.set_voice(voice)
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Create changelog files for important commits in a PR
日本語の概要は準備中です。原文の説明を表示しています。
Automated code review for pull requests using multiple specialized agents
日本語の概要は準備中です。原文の説明を表示しています。
Document a Python module and its classes using Google style
日本語の概要は準備中です。原文の説明を表示しています。
Draft or update a GitHub PR description that explains the problem, changed behavior, and review concerns in plain language.
日本語の概要は準備中です。原文の説明を表示しています。
Create and submit a GitHub PR from the current branch
日本語の概要は準備中です。原文の説明を表示しています。
Check that added comments, docstrings, and changelog entries document the code rather than narrate the change that produced it
日本語の概要は準備中です。原文の説明を表示しています。