everything but audioframe and endpipeframe
This commit is contained in:
@@ -3,14 +3,14 @@ import aiohttp
|
|||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from pipecat.pipeline.aggregators import SentenceAggregator
|
from pipeline.processors.aggregators import SentenceAggregator
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
|
|
||||||
from pipecat.transports.daily_transport import DailyTransport
|
from pipecat.transports.daily_transport import DailyTransport
|
||||||
from pipecat.services.azure_ai_services import AzureLLMService, AzureTTSService
|
from pipecat.services.azure_ai_services import AzureLLMService, AzureTTSService
|
||||||
from pipecat.services.elevenlabs_ai_services import ElevenLabsTTSService
|
from pipecat.services.elevenlabs_ai_services import ElevenLabsTTSService
|
||||||
from pipecat.services.fal_ai_services import FalImageGenService
|
from pipecat.services.fal_ai_services import FalImageGenService
|
||||||
from pipecat.pipeline.frames import AudioFrame, EndFrame, ImageFrame, LLMMessagesFrame, TextFrame
|
from pipecat.frames.frames import AudioFrame, EndFrame, ImageFrame, LLMMessagesFrame, TextFrame
|
||||||
|
|
||||||
from runner import configure
|
from runner import configure
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import asyncio
|
|||||||
import aiohttp
|
import aiohttp
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from pipecat.pipeline.frame_processor import FrameProcessor
|
from pipeline.processors.frame_processor import FrameProcessor
|
||||||
from pipecat.pipeline.frames import TextFrame, TranscriptionFrame
|
from pipecat.frames.frames import TextFrame, TranscriptionFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
from pipecat.services.elevenlabs_ai_services import ElevenLabsTTSService
|
from pipecat.services.elevenlabs_ai_services import ElevenLabsTTSService
|
||||||
from pipecat.transports.websocket_transport import WebsocketTransport
|
from pipecat.transports.websocket_transport import WebsocketTransport
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from typing import List
|
from typing import List
|
||||||
from pipecat.pipeline.frames import EndFrame, EndPipeFrame
|
from pipecat.frames.frames import EndFrame, EndPipeFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class GatedAggregator(FrameProcessor):
|
|||||||
Yields gate-opening frame before any accumulated frames, then ensuing frames
|
Yields gate-opening frame before any accumulated frames, then ensuing frames
|
||||||
until and not including the gate-closed frame.
|
until and not including the gate-closed frame.
|
||||||
|
|
||||||
>>> from pipecat.pipeline.frames import ImageFrame
|
>>> from pipecat.frames.frames import ImageFrame
|
||||||
|
|
||||||
>>> async def print_frames(aggregator, frame):
|
>>> async def print_frames(aggregator, frame):
|
||||||
... async for frame in aggregator.process_frame(frame):
|
... async for frame in aggregator.process_frame(frame):
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class VisionImageFrameAggregator(FrameProcessor):
|
|||||||
"""This aggregator waits for a consecutive TextFrame and an
|
"""This aggregator waits for a consecutive TextFrame and an
|
||||||
ImageFrame. After the ImageFrame arrives it will output a VisionImageFrame.
|
ImageFrame. After the ImageFrame arrives it will output a VisionImageFrame.
|
||||||
|
|
||||||
>>> from pipecat.pipeline.frames import ImageFrame
|
>>> from pipecat.frames.frames import ImageFrame
|
||||||
|
|
||||||
>>> async def print_frames(aggregator, frame):
|
>>> async def print_frames(aggregator, frame):
|
||||||
... async for frame in aggregator.process_frame(frame):
|
... async for frame in aggregator.process_frame(frame):
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
|
|
||||||
from pipecat.pipeline.frames import Frame
|
from pipecat.frames.frames import Frame
|
||||||
|
|
||||||
|
|
||||||
class FrameSerializer:
|
class FrameSerializer:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import dataclasses
|
import dataclasses
|
||||||
from typing import Text
|
from typing import Text
|
||||||
from pipecat.pipeline.frames import AudioFrame, Frame, TextFrame, TranscriptionFrame
|
from pipecat.frames.frames import AudioFrame, Frame, TextFrame, TranscriptionFrame
|
||||||
import pipecat.pipeline.protobufs.frames_pb2 as frame_protos
|
import pipecat.frames.protobufs.frames_pb2 as frame_protos
|
||||||
from pipecat.serializers.abstract_frame_serializer import FrameSerializer
|
from pipecat.serializers.abstract_frame_serializer import FrameSerializer
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import os
|
import os
|
||||||
from pipecat.pipeline.openai_frames import OpenAILLMContextFrame
|
from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContextFrame
|
||||||
from pipecat.services.azure_ai_services import AzureLLMService
|
from pipecat.services.azure import AzureLLMService
|
||||||
from pipecat.services.openai_llm_context import OpenAILLMContext
|
from pipecat.services.openai import OpenAILLMContext
|
||||||
|
|
||||||
from openai.types.chat import (
|
from openai.types.chat import (
|
||||||
ChatCompletionSystemMessageParam,
|
ChatCompletionSystemMessageParam,
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
from pipecat.pipeline.openai_frames import OpenAILLMContextFrame
|
from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContextFrame, OpenAILLMContext
|
||||||
from pipecat.services.openai_llm_context import OpenAILLMContext
|
|
||||||
|
|
||||||
from openai.types.chat import (
|
from openai.types.chat import (
|
||||||
ChatCompletionSystemMessageParam,
|
ChatCompletionSystemMessageParam,
|
||||||
)
|
)
|
||||||
from pipecat.services.ollama_ai_services import OLLamaLLMService
|
from pipecat.services.ollama import OLLamaLLMService
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
async def test_chat():
|
async def test_chat():
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
||||||
from pipecat.services.openai import OpenAILLMContextFrame, OpenAILLMContext
|
from pipecat.services.openai import OpenAILLMContextFrame, OpenAILLMContext
|
||||||
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
|
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
|
||||||
from pipecat.frames.frames import (
|
from pipecat.frames.frames import (
|
||||||
|
|||||||
@@ -3,13 +3,12 @@ import doctest
|
|||||||
import functools
|
import functools
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from pipecat.pipeline.aggregators import (
|
from pipecat.processors.aggregators.sentence import SentenceAggregator
|
||||||
GatedAggregator,
|
from pipecat.processors.text_transformer import StatelessTextTransformer
|
||||||
ParallelPipeline,
|
from pipecat.processors.aggregators.gated import GatedAggregator
|
||||||
SentenceAggregator,
|
from pipecat.pipeline.parallel_pipeline import ParallelPipeline
|
||||||
StatelessTextTransformer,
|
|
||||||
)
|
from pipecat.frames.frames import (
|
||||||
from pipecat.pipeline.frames import (
|
|
||||||
AudioFrame,
|
AudioFrame,
|
||||||
EndFrame,
|
EndFrame,
|
||||||
ImageFrame,
|
ImageFrame,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import unittest
|
|||||||
from typing import AsyncGenerator
|
from typing import AsyncGenerator
|
||||||
|
|
||||||
from pipecat.services.ai_services import AIService
|
from pipecat.services.ai_services import AIService
|
||||||
from pipecat.pipeline.frames import EndFrame, Frame, TextFrame
|
from pipecat.frames.frames import EndFrame, Frame, TextFrame
|
||||||
|
|
||||||
|
|
||||||
class SimpleAIService(AIService):
|
class SimpleAIService(AIService):
|
||||||
|
|||||||
@@ -2,9 +2,10 @@ import asyncio
|
|||||||
import unittest
|
import unittest
|
||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
|
|
||||||
from pipecat.pipeline.aggregators import SentenceAggregator, StatelessTextTransformer
|
from pipecat.processors.text_transformer import StatelessTextTransformer
|
||||||
from pipecat.pipeline.frame_processor import FrameProcessor
|
from pipecat.processors.aggregators.sentence import SentenceAggregator
|
||||||
from pipecat.pipeline.frames import EndFrame, TextFrame
|
from pipecat.processors.frame_processor import FrameProcessor
|
||||||
|
from pipecat.frames.frames import EndFrame, TextFrame
|
||||||
|
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from pipecat.pipeline.frames import AudioFrame, TextFrame, TranscriptionFrame
|
from pipecat.frames.frames import AudioFrame, TextFrame, TranscriptionFrame
|
||||||
from pipecat.serializers.protobuf_serializer import ProtobufFrameSerializer
|
from pipecat.serializers.protobuf_serializer import ProtobufFrameSerializer
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import asyncio
|
|||||||
import unittest
|
import unittest
|
||||||
from unittest.mock import AsyncMock, patch, Mock
|
from unittest.mock import AsyncMock, patch, Mock
|
||||||
|
|
||||||
from pipecat.pipeline.frames import AudioFrame, EndFrame, TextFrame, TTSEndFrame, TTSStartFrame
|
from pipecat.frames.frames import AudioFrame, EndFrame, TextFrame, TTSEndFrame, TTSStartFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
from pipecat.transports.websocket_transport import WebSocketFrameProcessor, WebsocketTransport
|
from pipecat.transports.websocket_transport import WebSocketFrameProcessor, WebsocketTransport
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user