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:
@@ -14,6 +14,7 @@ from loguru import logger
|
||||
from pipecat.frames.frames import (
|
||||
DataFrame,
|
||||
Frame,
|
||||
LLMContextFrame,
|
||||
LLMFullResponseStartFrame,
|
||||
TextFrame,
|
||||
)
|
||||
@@ -21,10 +22,8 @@ from pipecat.pipeline.pipeline import Pipeline
|
||||
from pipecat.pipeline.runner import PipelineRunner
|
||||
from pipecat.pipeline.sync_parallel_pipeline import SyncParallelPipeline
|
||||
from pipecat.pipeline.task import PipelineTask
|
||||
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.processors.aggregators.sentence import SentenceAggregator
|
||||
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
|
||||
from pipecat.runner.types import RunnerArguments
|
||||
@@ -156,7 +155,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
}
|
||||
]
|
||||
frames.append(MonthFrame(month=month))
|
||||
frames.append(OpenAILLMContextFrame(OpenAILLMContext(messages)))
|
||||
frames.append(LLMContextFrame(LLMContext(messages)))
|
||||
|
||||
task = PipelineTask(
|
||||
pipeline,
|
||||
|
||||
Reference in New Issue
Block a user