Deprecate expect_stripped_words option from LLMAssistantAggregatorParams, when used with the newer LLMAssistantAggregator, which now handles word spacing automatically.
This commit does not change how it works in the older `LLMAssistantContextAggregator`.
This commit is contained in:
@@ -187,12 +187,7 @@ Remember, your responses should be short. Just one or two sentences, usually. Re
|
||||
tools,
|
||||
)
|
||||
|
||||
context_aggregator = LLMContextAggregatorPair(
|
||||
context,
|
||||
# `expect_stripped_words=False` needed when OpenAI Realtime used with
|
||||
# "audio" modality (the default)
|
||||
assistant_params=LLMAssistantAggregatorParams(expect_stripped_words=False),
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(context)
|
||||
|
||||
pipeline = Pipeline(
|
||||
[
|
||||
|
||||
@@ -175,12 +175,7 @@ Remember, your responses should be short. Just one or two sentences, usually. Re
|
||||
tools,
|
||||
)
|
||||
|
||||
context_aggregator = LLMContextAggregatorPair(
|
||||
context,
|
||||
# `expect_stripped_words=False` needed when OpenAI Realtime used with
|
||||
# "audio" modality (the default)
|
||||
assistant_params=LLMAssistantAggregatorParams(expect_stripped_words=False),
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(context)
|
||||
|
||||
pipeline = Pipeline(
|
||||
[
|
||||
|
||||
@@ -92,12 +92,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
# },
|
||||
],
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(
|
||||
context,
|
||||
# `expect_stripped_words=False` needed when Gemini Live used with AUDIO
|
||||
# modality (the default)
|
||||
assistant_params=LLMAssistantAggregatorParams(expect_stripped_words=False),
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(context)
|
||||
|
||||
transcript = TranscriptProcessor()
|
||||
|
||||
|
||||
@@ -144,12 +144,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
context = LLMContext(
|
||||
[{"role": "user", "content": "Say hello."}],
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(
|
||||
context,
|
||||
# `expect_stripped_words=False` needed when Gemini Live used with AUDIO
|
||||
# modality (the default)
|
||||
assistant_params=LLMAssistantAggregatorParams(expect_stripped_words=False),
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(context)
|
||||
|
||||
pipeline = Pipeline(
|
||||
[
|
||||
|
||||
@@ -75,12 +75,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
},
|
||||
],
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(
|
||||
context,
|
||||
# `expect_stripped_words=False` needed when Gemini Live used with AUDIO
|
||||
# modality (the default)
|
||||
assistant_params=LLMAssistantAggregatorParams(expect_stripped_words=False),
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(context)
|
||||
|
||||
pipeline = Pipeline(
|
||||
[
|
||||
|
||||
@@ -100,12 +100,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
}
|
||||
],
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(
|
||||
context,
|
||||
# `expect_stripped_words=False` needed when Gemini Live used with AUDIO
|
||||
# modality (the default)
|
||||
assistant_params=LLMAssistantAggregatorParams(expect_stripped_words=False),
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(context)
|
||||
|
||||
pipeline = Pipeline(
|
||||
[
|
||||
|
||||
@@ -164,12 +164,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
)
|
||||
|
||||
# Create context aggregator
|
||||
context_aggregator = LLMContextAggregatorPair(
|
||||
context,
|
||||
# `expect_stripped_words=False` needed when Gemini Live used with AUDIO
|
||||
# modality (the default)
|
||||
assistant_params=LLMAssistantAggregatorParams(expect_stripped_words=False),
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(context)
|
||||
|
||||
# Build the pipeline
|
||||
pipeline = Pipeline(
|
||||
|
||||
@@ -127,12 +127,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
|
||||
# Set up conversation context and management
|
||||
context = LLMContext(messages)
|
||||
context_aggregator = LLMContextAggregatorPair(
|
||||
context,
|
||||
# `expect_stripped_words=False` needed when Gemini Live used with AUDIO
|
||||
# modality (the default)
|
||||
assistant_params=LLMAssistantAggregatorParams(expect_stripped_words=False),
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(context)
|
||||
|
||||
pipeline = Pipeline(
|
||||
[
|
||||
|
||||
@@ -140,12 +140,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
llm.register_function("get_restaurant_recommendation", fetch_restaurant_recommendation)
|
||||
|
||||
context = LLMContext([{"role": "user", "content": "Say hello."}])
|
||||
context_aggregator = LLMContextAggregatorPair(
|
||||
context,
|
||||
# `expect_stripped_words=False` needed when Gemini Live used with AUDIO
|
||||
# modality (the default)
|
||||
assistant_params=LLMAssistantAggregatorParams(expect_stripped_words=False),
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(context)
|
||||
|
||||
pipeline = Pipeline(
|
||||
[
|
||||
|
||||
@@ -157,12 +157,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
context = LLMContext(
|
||||
[{"role": "user", "content": "Say hello."}],
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(
|
||||
context,
|
||||
# `expect_stripped_words=False` needed when Gemini Live used with AUDIO
|
||||
# modality (the default)
|
||||
assistant_params=LLMAssistantAggregatorParams(expect_stripped_words=False),
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(context)
|
||||
|
||||
pipeline = Pipeline(
|
||||
[
|
||||
|
||||
@@ -111,12 +111,7 @@ async def run_bot(pipecat_transport):
|
||||
]
|
||||
|
||||
context = LLMContext(messages)
|
||||
context_aggregator = LLMContextAggregatorPair(
|
||||
context,
|
||||
# `expect_stripped_words=False` needed when Gemini Live used with AUDIO
|
||||
# modality (the default)
|
||||
assistant_params=LLMAssistantAggregatorParams(expect_stripped_words=False),
|
||||
)
|
||||
context_aggregator = LLMContextAggregatorPair(context)
|
||||
|
||||
# RTVI events for Pipecat client UI
|
||||
rtvi = RTVIProcessor()
|
||||
|
||||
Reference in New Issue
Block a user