examples: update 14 series with TTSSpeakFrame
This commit is contained in:
@@ -15,7 +15,7 @@ from openai.types.chat import ChatCompletionToolParam
|
|||||||
from runner import configure
|
from runner import configure
|
||||||
|
|
||||||
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
||||||
from pipecat.frames.frames import TextFrame
|
from pipecat.frames.frames import TTSSpeakFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
||||||
@@ -31,7 +31,7 @@ logger.add(sys.stderr, level="DEBUG")
|
|||||||
|
|
||||||
async def start_fetch_weather(function_name, llm, context):
|
async def start_fetch_weather(function_name, llm, context):
|
||||||
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
||||||
await llm.push_frame(TextFrame("Let me check on that."))
|
await llm.push_frame(TTSSpeakFrame("Let me check on that."))
|
||||||
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from openai.types.chat import ChatCompletionToolParam
|
|||||||
from runner import configure
|
from runner import configure
|
||||||
|
|
||||||
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
||||||
from pipecat.frames.frames import TextFrame
|
from pipecat.frames.frames import TTSSpeakFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineTask
|
from pipecat.pipeline.task import PipelineTask
|
||||||
@@ -32,7 +32,7 @@ logger.add(sys.stderr, level="DEBUG")
|
|||||||
|
|
||||||
async def start_fetch_weather(function_name, llm, context):
|
async def start_fetch_weather(function_name, llm, context):
|
||||||
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
||||||
await llm.push_frame(TextFrame("Let me check on that."))
|
await llm.push_frame(TTSSpeakFrame("Let me check on that."))
|
||||||
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from openai.types.chat import ChatCompletionToolParam
|
|||||||
from runner import configure
|
from runner import configure
|
||||||
|
|
||||||
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
||||||
from pipecat.frames.frames import TextFrame
|
from pipecat.frames.frames import TTSSpeakFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
||||||
@@ -32,7 +32,7 @@ logger.add(sys.stderr, level="DEBUG")
|
|||||||
|
|
||||||
async def start_fetch_weather(function_name, llm, context):
|
async def start_fetch_weather(function_name, llm, context):
|
||||||
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
||||||
await llm.push_frame(TextFrame("Let me check on that."))
|
await llm.push_frame(TTSSpeakFrame("Let me check on that."))
|
||||||
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from openai.types.chat import ChatCompletionToolParam
|
|||||||
from runner import configure
|
from runner import configure
|
||||||
|
|
||||||
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
||||||
from pipecat.frames.frames import TextFrame
|
from pipecat.frames.frames import TTSSpeakFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
||||||
@@ -32,7 +32,7 @@ logger.add(sys.stderr, level="DEBUG")
|
|||||||
|
|
||||||
async def start_fetch_weather(function_name, llm, context):
|
async def start_fetch_weather(function_name, llm, context):
|
||||||
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
||||||
await llm.push_frame(TextFrame("Let me check on that."))
|
await llm.push_frame(TTSSpeakFrame("Let me check on that."))
|
||||||
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from openai.types.chat import ChatCompletionToolParam
|
|||||||
from runner import configure
|
from runner import configure
|
||||||
|
|
||||||
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
||||||
from pipecat.frames.frames import TextFrame
|
from pipecat.frames.frames import TTSSpeakFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
||||||
@@ -32,7 +32,7 @@ logger.add(sys.stderr, level="DEBUG")
|
|||||||
|
|
||||||
async def start_fetch_weather(function_name, llm, context):
|
async def start_fetch_weather(function_name, llm, context):
|
||||||
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
||||||
await llm.push_frame(TextFrame("Let me check on that."))
|
await llm.push_frame(TTSSpeakFrame("Let me check on that."))
|
||||||
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from openai.types.chat import ChatCompletionToolParam
|
|||||||
from runner import configure
|
from runner import configure
|
||||||
|
|
||||||
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
||||||
from pipecat.frames.frames import TextFrame
|
from pipecat.frames.frames import TTSSpeakFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
||||||
@@ -32,7 +32,7 @@ logger.add(sys.stderr, level="DEBUG")
|
|||||||
|
|
||||||
async def start_fetch_weather(function_name, llm, context):
|
async def start_fetch_weather(function_name, llm, context):
|
||||||
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
||||||
await llm.push_frame(TextFrame("Let me check on that."))
|
await llm.push_frame(TTSSpeakFrame("Let me check on that."))
|
||||||
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from openai.types.chat import ChatCompletionToolParam
|
|||||||
from runner import configure
|
from runner import configure
|
||||||
|
|
||||||
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
||||||
from pipecat.frames.frames import TextFrame
|
from pipecat.frames.frames import TTSSpeakFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
||||||
@@ -32,7 +32,7 @@ logger.add(sys.stderr, level="DEBUG")
|
|||||||
|
|
||||||
async def start_fetch_weather(function_name, llm, context):
|
async def start_fetch_weather(function_name, llm, context):
|
||||||
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
||||||
await llm.push_frame(TextFrame("Let me check on that."))
|
await llm.push_frame(TTSSpeakFrame("Let me check on that."))
|
||||||
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from openai.types.chat import ChatCompletionToolParam
|
|||||||
from runner import configure
|
from runner import configure
|
||||||
|
|
||||||
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
||||||
from pipecat.frames.frames import TextFrame
|
from pipecat.frames.frames import TTSSpeakFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
||||||
@@ -32,7 +32,7 @@ logger.add(sys.stderr, level="DEBUG")
|
|||||||
|
|
||||||
async def start_fetch_weather(function_name, llm, context):
|
async def start_fetch_weather(function_name, llm, context):
|
||||||
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
||||||
await llm.push_frame(TextFrame("Let me check on that."))
|
await llm.push_frame(TTSSpeakFrame("Let me check on that."))
|
||||||
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
||||||
|
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ async def main():
|
|||||||
messages = [
|
messages = [
|
||||||
{
|
{
|
||||||
"role": "system",
|
"role": "system",
|
||||||
"content": """You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way.
|
"content": """You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way.
|
||||||
|
|
||||||
You have one functions available:
|
You have one functions available:
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from openai.types.chat import ChatCompletionToolParam
|
|||||||
from runner import configure
|
from runner import configure
|
||||||
|
|
||||||
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
||||||
from pipecat.frames.frames import TextFrame
|
from pipecat.frames.frames import TTSSpeakFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
||||||
@@ -32,7 +32,7 @@ logger.add(sys.stderr, level="DEBUG")
|
|||||||
|
|
||||||
async def start_fetch_weather(function_name, llm, context):
|
async def start_fetch_weather(function_name, llm, context):
|
||||||
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
||||||
await llm.push_frame(TextFrame("Let me check on that."))
|
await llm.push_frame(TTSSpeakFrame("Let me check on that."))
|
||||||
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
||||||
|
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ async def main():
|
|||||||
messages = [
|
messages = [
|
||||||
{
|
{
|
||||||
"role": "system",
|
"role": "system",
|
||||||
"content": """You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way.
|
"content": """You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way.
|
||||||
|
|
||||||
You have one functions available:
|
You have one functions available:
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from openai.types.chat import ChatCompletionToolParam
|
|||||||
from runner import configure
|
from runner import configure
|
||||||
|
|
||||||
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
from pipecat.audio.vad.silero import SileroVADAnalyzer
|
||||||
from pipecat.frames.frames import TextFrame
|
from pipecat.frames.frames import TTSSpeakFrame
|
||||||
from pipecat.pipeline.pipeline import Pipeline
|
from pipecat.pipeline.pipeline import Pipeline
|
||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
||||||
@@ -32,7 +32,7 @@ logger.add(sys.stderr, level="DEBUG")
|
|||||||
|
|
||||||
async def start_fetch_weather(function_name, llm, context):
|
async def start_fetch_weather(function_name, llm, context):
|
||||||
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
"""Push a frame to the LLM; this is handy when the LLM response might take a while."""
|
||||||
await llm.push_frame(TextFrame("Let me check on that."))
|
await llm.push_frame(TTSSpeakFrame("Let me check on that."))
|
||||||
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
logger.debug(f"Starting fetch_weather_from_api with function_name: {function_name}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user