services: import cosmetics

This commit is contained in:
Aleix Conchillo Flaqué
2024-09-27 13:32:27 -07:00
parent 50b6580fbb
commit d9b16d4f73
6 changed files with 21 additions and 13 deletions

View File

@@ -3,9 +3,9 @@
# #
# SPDX-License-Identifier: BSD 2-Clause License # SPDX-License-Identifier: BSD 2-Clause License
# #
from typing import AsyncGenerator, Optional from typing import AsyncGenerator, Optional
from loguru import logger
from pydantic import BaseModel from pydantic import BaseModel
from pipecat.frames.frames import ( from pipecat.frames.frames import (
@@ -17,6 +17,8 @@ from pipecat.frames.frames import (
) )
from pipecat.services.ai_services import TTSService from pipecat.services.ai_services import TTSService
from loguru import logger
try: try:
import boto3 import boto3
from botocore.exceptions import BotoCoreError, ClientError from botocore.exceptions import BotoCoreError, ClientError

View File

@@ -4,13 +4,12 @@
# SPDX-License-Identifier: BSD 2-Clause License # SPDX-License-Identifier: BSD 2-Clause License
# #
import aiohttp
import asyncio import asyncio
import io import io
from typing import AsyncGenerator, Optional from typing import AsyncGenerator, Optional
import aiohttp
from loguru import logger
from PIL import Image
from pydantic import BaseModel from pydantic import BaseModel
from pipecat.frames.frames import ( from pipecat.frames.frames import (
@@ -29,6 +28,10 @@ from pipecat.services.ai_services import ImageGenService, STTService, TTSService
from pipecat.services.openai import BaseOpenAILLMService from pipecat.services.openai import BaseOpenAILLMService
from pipecat.utils.time import time_now_iso8601 from pipecat.utils.time import time_now_iso8601
from PIL import Image
from loguru import logger
# See .env.example for Azure configuration needed # See .env.example for Azure configuration needed
try: try:
from azure.cognitiveservices.speech import ( from azure.cognitiveservices.speech import (

View File

@@ -5,9 +5,8 @@
# #
import asyncio import asyncio
from typing import AsyncGenerator
from loguru import logger from typing import AsyncGenerator
from pipecat.frames.frames import ( from pipecat.frames.frames import (
CancelFrame, CancelFrame,
@@ -25,6 +24,8 @@ from pipecat.services.ai_services import STTService, TTSService
from pipecat.transcriptions.language import Language from pipecat.transcriptions.language import Language
from pipecat.utils.time import time_now_iso8601 from pipecat.utils.time import time_now_iso8601
from loguru import logger
# See .env.example for Deepgram configuration needed # See .env.example for Deepgram configuration needed
try: try:
from deepgram import ( from deepgram import (

View File

@@ -8,13 +8,14 @@ import aiohttp
import io import io
import os import os
from PIL import Image
from pydantic import BaseModel from pydantic import BaseModel
from typing import AsyncGenerator, Optional, Union, Dict from typing import AsyncGenerator, Optional, Union, Dict
from pipecat.frames.frames import ErrorFrame, Frame, URLImageRawFrame from pipecat.frames.frames import ErrorFrame, Frame, URLImageRawFrame
from pipecat.services.ai_services import ImageGenService from pipecat.services.ai_services import ImageGenService
from PIL import Image
from loguru import logger from loguru import logger
try: try:

View File

@@ -9,14 +9,12 @@ import base64
import io import io
import json import json
import httpx import httpx
from dataclasses import dataclass from dataclasses import dataclass
from typing import Any, AsyncGenerator, Dict, List, Literal, Optional from typing import Any, AsyncGenerator, Dict, List, Literal, Optional
from pydantic import BaseModel, Field from pydantic import BaseModel, Field
from loguru import logger
from PIL import Image
from pipecat.frames.frames import ( from pipecat.frames.frames import (
ErrorFrame, ErrorFrame,
Frame, Frame,
@@ -39,7 +37,6 @@ from pipecat.processors.aggregators.llm_response import (
LLMUserContextAggregator, LLMUserContextAggregator,
LLMAssistantContextAggregator, LLMAssistantContextAggregator,
) )
from pipecat.processors.aggregators.openai_llm_context import ( from pipecat.processors.aggregators.openai_llm_context import (
OpenAILLMContext, OpenAILLMContext,
OpenAILLMContextFrame, OpenAILLMContextFrame,
@@ -47,6 +44,10 @@ from pipecat.processors.aggregators.openai_llm_context import (
from pipecat.processors.frame_processor import FrameDirection from pipecat.processors.frame_processor import FrameDirection
from pipecat.services.ai_services import ImageGenService, LLMService, TTSService from pipecat.services.ai_services import ImageGenService, LLMService, TTSService
from PIL import Image
from loguru import logger
try: try:
from openai import AsyncOpenAI, AsyncStream, DefaultAsyncHttpxClient, BadRequestError, NOT_GIVEN from openai import AsyncOpenAI, AsyncStream, DefaultAsyncHttpxClient, BadRequestError, NOT_GIVEN
from openai.types.chat import ChatCompletionChunk, ChatCompletionMessageParam from openai.types.chat import ChatCompletionChunk, ChatCompletionMessageParam

View File

@@ -18,10 +18,10 @@ from pipecat.frames.frames import (
) )
from pipecat.services.ai_services import TTSService from pipecat.services.ai_services import TTSService
from loguru import logger
import numpy as np import numpy as np
from loguru import logger
try: try:
import resampy import resampy
except ModuleNotFoundError as e: except ModuleNotFoundError as e: