Update examples, wherever possible, to use LLMContext and associated machinery instead of OpenAILLMContext and associated machinery.
With all these examples updated, we no longer need dedicated examples illustrating `LLMContext`, so they're removed. Here’s where we *don’t* yet use `LLMContext` and associated machinery: - Realtime services: OpenAI Realtime, Gemini Live, and AWS Nova Sonic (support coming soon) - `GoogleLLMOpenAIBetaService` (it’s deprecated, so we didn’t bother adding support) - `LLMLogObserver` (support coming soon) - `GatedOpenAILLMContextAggregator` (support coming soon) - `LangchainProcessor` (support coming soon) - `Mem0MemoryService` (support coming soon) - Examples that use LLM-specific tools definitions as opposed to `ToolsSchema` (these will be updated soon) - Examples that rely `GoogleLLMContext.upgrade_to_google` (TBD what to do with these) Examples that use `LLMLogObserver`: - 30- Examples that use `GatedOpenAILLMContextAggregator`: - 22- Examples that use `LangchainProcessor`: - 07b- Examples that use `Mem0MemoryService`: - 37- Examples that need updating to use `ToolsSchema`: - 15- - 15a- - 20a- - 20c- - 20d- - 22b- - 22c- - 33- - 36- Examples that use `GoogleLLMContext.upgrade_to_google`: - 22d- - 25-
This commit is contained in:
@@ -6,13 +6,11 @@ from typing import Tuple
|
||||
import aiohttp
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from pipecat.frames.frames import AudioFrame, EndFrame, ImageFrame, TextFrame
|
||||
from pipecat.frames.frames import AudioFrame, EndFrame, ImageFrame, LLMContextFrame, TextFrame
|
||||
from pipecat.pipeline.pipeline import Pipeline
|
||||
from pipecat.processors.aggregators import SentenceAggregator
|
||||
from pipecat.processors.aggregators.openai_llm_context import (
|
||||
OpenAILLMContext,
|
||||
OpenAILLMContextFrame,
|
||||
)
|
||||
from pipecat.processors.aggregators.llm_context import LLMContext
|
||||
from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair
|
||||
from pipecat.runner.daily import configure
|
||||
from pipecat.services.azure import AzureLLMService, AzureTTSService
|
||||
from pipecat.services.elevenlabs import ElevenLabsTTSService
|
||||
@@ -83,7 +81,7 @@ async def main():
|
||||
sentence_aggregator = SentenceAggregator()
|
||||
pipeline = Pipeline([llm, sentence_aggregator, tts1], source_queue, sink_queue)
|
||||
|
||||
await source_queue.put(OpenAILLMContextFrame(OpenAILLMContext(messages)))
|
||||
await source_queue.put(LLMContextFrame(LLMContext(messages)))
|
||||
await source_queue.put(EndFrame())
|
||||
await pipeline.run_pipeline()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user