07n uses all Google services
This commit is contained in:
@@ -18,10 +18,7 @@ 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
|
||||||
from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext
|
from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext
|
||||||
from pipecat.services.deepgram import DeepgramSTTService
|
from pipecat.services.google import GoogleLLMService, GoogleSTTService, GoogleTTSService
|
||||||
from pipecat.services.google import GoogleTTSService
|
|
||||||
from pipecat.services.google.google import GoogleSTTService
|
|
||||||
from pipecat.services.openai import OpenAILLMService
|
|
||||||
from pipecat.transcriptions.language import Language
|
from pipecat.transcriptions.language import Language
|
||||||
from pipecat.transports.services.daily import DailyParams, DailyTransport
|
from pipecat.transports.services.daily import DailyParams, DailyTransport
|
||||||
|
|
||||||
@@ -48,16 +45,15 @@ async def main():
|
|||||||
)
|
)
|
||||||
|
|
||||||
stt = GoogleSTTService(
|
stt = GoogleSTTService(
|
||||||
credentials=os.getenv("GOOGLE_TEST_CREDENTIALS"),
|
params=GoogleSTTService.InputParams(language=Language.EN_US),
|
||||||
)
|
)
|
||||||
|
|
||||||
tts = GoogleTTSService(
|
tts = GoogleTTSService(
|
||||||
voice_id="en-US-Journey-F",
|
voice_id="en-US-Journey-F",
|
||||||
params=GoogleTTSService.InputParams(language=Language.EN_US),
|
params=GoogleTTSService.InputParams(language=Language.EN_US),
|
||||||
credentials=os.getenv("GOOGLE_TEST_CREDENTIALS"),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4o")
|
llm = GoogleLLMService(api_key=os.getenv("GOOGLE_API_KEY"))
|
||||||
|
|
||||||
messages = [
|
messages = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -932,7 +932,7 @@ class GoogleLLMContext(OpenAILLMContext):
|
|||||||
|
|
||||||
|
|
||||||
class GoogleLLMService(LLMService):
|
class GoogleLLMService(LLMService):
|
||||||
"""This class implements inference with Google's AI models
|
"""This class implements inference with Google's AI models.
|
||||||
|
|
||||||
This service translates internally from OpenAILLMContext to the messages format
|
This service translates internally from OpenAILLMContext to the messages format
|
||||||
expected by the Google AI model. We are using the OpenAILLMContext as a lingua
|
expected by the Google AI model. We are using the OpenAILLMContext as a lingua
|
||||||
|
|||||||
Reference in New Issue
Block a user