Same approach as the previous round — apply boundary casts where the code does dict-style mutation on TypedDict-typed values, narrow at return sites, and document the LLMSpecificMessage limitation in realtime adapters that pack history into a single text message. aws_nova_sonic_adapter.py — pure typing + small narrowing fixes: - Filter LLMSpecific items in `_from_universal_context_messages` (documented). - `_from_universal_context_message` now declared `-> AWSNovaSonicConversationHistoryMessage | None` (it already had paths returning None implicitly). - `get_messages_for_logging` returns `dict[str, Any]` per element via `dataclasses.asdict`, matching the declared return type. - Use a local `role` variable so pyright keeps the narrowing across the truthy-content guard. grok_realtime_adapter.py / inworld_realtime_adapter.py — same shape of fix as `open_ai_realtime_adapter.py` from the previous batch. The two files are essentially copies of the OpenAI Realtime adapter, so the same template applies: cast at the boundary, filter LLMSpecificMessage with a documented note, replace the implicit-None fallthrough with `raise ValueError`, and switch the `text_content +=` pattern (which fails when one of the parts is None) to a `text_parts.append(...)` + `" ".join(...)` pattern. open_ai_adapter.py — pure typing. Cast at the `OpenAILLMInvocationParams` return, narrow the system-instruction warning's `initial_content` to `str | None`, and cast the custom-tools list to `list[ChatCompletionToolParam]`. open_ai_responses_adapter.py — pure typing. Same shape: narrow `first_content` to `str | None` for the warning resolver, cast the constructed dict literals at append sites where the target is `ResponseInputItemParam`, and cast `get_messages_for_logging`'s return to the declared `list[dict[str, Any]]`. processors/aggregators/llm_context.py — pure typing. Cast the deepcopied message in the redaction loop in `get_messages` to `dict[str, Any]` and the create_image/audio_message return-dict literals to `LLMContextMessage`. Removes 6 newly-clean files from the pyright ignore list. Net: -77 pyright errors (full-config: 680 -> 603).
107 lines
4.6 KiB
JSON
107 lines
4.6 KiB
JSON
{
|
|
"typeCheckingMode": "basic",
|
|
"pythonVersion": "3.11",
|
|
"pythonPlatform": "All",
|
|
"include": ["scripts", "src/pipecat"],
|
|
"exclude": ["**/*_pb2.py", "**/__pycache__"],
|
|
"ignore": [
|
|
"tests",
|
|
"src/pipecat/audio/dtmf/utils.py",
|
|
"src/pipecat/audio/filters/aic_filter.py",
|
|
"src/pipecat/audio/filters/krisp_viva_filter.py",
|
|
"src/pipecat/audio/filters/rnnoise_filter.py",
|
|
"src/pipecat/audio/turn/smart_turn/local_smart_turn_v2.py",
|
|
"src/pipecat/audio/turn/smart_turn/local_smart_turn_v3.py",
|
|
"src/pipecat/audio/vad/silero.py",
|
|
"src/pipecat/processors/aggregators/llm_response_universal.py",
|
|
"src/pipecat/processors/frame_processor.py",
|
|
"src/pipecat/processors/frameworks/langchain.py",
|
|
"src/pipecat/processors/frameworks/rtvi/observer.py",
|
|
"src/pipecat/processors/frameworks/rtvi/processor.py",
|
|
"src/pipecat/processors/frameworks/strands_agents.py",
|
|
"src/pipecat/services/anthropic/llm.py",
|
|
"src/pipecat/services/assemblyai/stt.py",
|
|
"src/pipecat/services/aws/agent_core.py",
|
|
"src/pipecat/services/aws/llm.py",
|
|
"src/pipecat/services/aws/nova_sonic/llm.py",
|
|
"src/pipecat/services/aws/sagemaker/bidi_client.py",
|
|
"src/pipecat/services/aws/stt.py",
|
|
"src/pipecat/services/aws/tts.py",
|
|
"src/pipecat/services/aws/utils.py",
|
|
"src/pipecat/services/azure/stt.py",
|
|
"src/pipecat/services/azure/tts.py",
|
|
"src/pipecat/services/deepgram/flux/base.py",
|
|
"src/pipecat/services/deepgram/flux/sagemaker/stt.py",
|
|
"src/pipecat/services/deepgram/flux/stt.py",
|
|
"src/pipecat/services/deepgram/sagemaker/stt.py",
|
|
"src/pipecat/services/deepgram/sagemaker/tts.py",
|
|
"src/pipecat/services/deepgram/tts.py",
|
|
"src/pipecat/services/elevenlabs/tts.py",
|
|
"src/pipecat/services/fish/tts.py",
|
|
"src/pipecat/services/gladia/stt.py",
|
|
"src/pipecat/services/google/gemini_live/llm.py",
|
|
"src/pipecat/services/google/gemini_live/vertex/llm.py",
|
|
"src/pipecat/services/google/image.py",
|
|
"src/pipecat/services/google/llm.py",
|
|
"src/pipecat/services/google/stt.py",
|
|
"src/pipecat/services/google/tts.py",
|
|
"src/pipecat/services/gradium/stt.py",
|
|
"src/pipecat/services/groq/tts.py",
|
|
"src/pipecat/services/heygen/api_interactive_avatar.py",
|
|
"src/pipecat/services/heygen/base_api.py",
|
|
"src/pipecat/services/heygen/client.py",
|
|
"src/pipecat/services/heygen/video.py",
|
|
"src/pipecat/services/hume/tts.py",
|
|
"src/pipecat/services/inworld/realtime/llm.py",
|
|
"src/pipecat/services/inworld/tts.py",
|
|
"src/pipecat/services/kokoro/tts.py",
|
|
"src/pipecat/services/llm_service.py",
|
|
"src/pipecat/services/lmnt/tts.py",
|
|
"src/pipecat/services/mem0/memory.py",
|
|
"src/pipecat/services/mistral/stt.py",
|
|
"src/pipecat/services/mistral/tts.py",
|
|
"src/pipecat/services/moondream/vision.py",
|
|
"src/pipecat/services/neuphonic/tts.py",
|
|
"src/pipecat/services/nvidia/stt.py",
|
|
"src/pipecat/services/nvidia/tts.py",
|
|
"src/pipecat/services/openai/base_llm.py",
|
|
"src/pipecat/services/openai/image.py",
|
|
"src/pipecat/services/openai/llm.py",
|
|
"src/pipecat/services/openai/realtime/llm.py",
|
|
"src/pipecat/services/openai/responses/llm.py",
|
|
"src/pipecat/services/openai/stt.py",
|
|
"src/pipecat/services/openai/tts.py",
|
|
"src/pipecat/services/openrouter/llm.py",
|
|
"src/pipecat/services/piper/tts.py",
|
|
"src/pipecat/services/resembleai/tts.py",
|
|
"src/pipecat/services/rime/tts.py",
|
|
"src/pipecat/services/sambanova/llm.py",
|
|
"src/pipecat/services/sarvam/stt.py",
|
|
"src/pipecat/services/sarvam/tts.py",
|
|
"src/pipecat/services/simli/video.py",
|
|
"src/pipecat/services/smallest/tts.py",
|
|
"src/pipecat/services/speechmatics/stt.py",
|
|
"src/pipecat/services/stt_service.py",
|
|
"src/pipecat/services/tavus/video.py",
|
|
"src/pipecat/services/tts_service.py",
|
|
"src/pipecat/services/ultravox/llm.py",
|
|
"src/pipecat/services/websocket_service.py",
|
|
"src/pipecat/services/whisper/stt.py",
|
|
"src/pipecat/services/xai/realtime/llm.py",
|
|
"src/pipecat/services/xtts/tts.py",
|
|
"src/pipecat/transports/base_output.py",
|
|
"src/pipecat/transports/daily/transport.py",
|
|
"src/pipecat/transports/heygen/transport.py",
|
|
"src/pipecat/transports/lemonslice/transport.py",
|
|
"src/pipecat/transports/livekit/transport.py",
|
|
"src/pipecat/transports/smallwebrtc/connection.py",
|
|
"src/pipecat/transports/smallwebrtc/request_handler.py",
|
|
"src/pipecat/transports/smallwebrtc/transport.py",
|
|
"src/pipecat/transports/tavus/transport.py",
|
|
"src/pipecat/transports/websocket/client.py",
|
|
"src/pipecat/transports/websocket/server.py",
|
|
"src/pipecat/transports/whatsapp/client.py"
|
|
],
|
|
"reportMissingImports": false
|
|
}
|