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
#
from typing import AsyncGenerator, Optional
from loguru import logger
from pydantic import BaseModel
from pipecat.frames.frames import (
@@ -17,6 +17,8 @@ from pipecat.frames.frames import (
)
from pipecat.services.ai_services import TTSService
from loguru import logger
try:
import boto3
from botocore.exceptions import BotoCoreError, ClientError

View File

@@ -4,13 +4,12 @@
# SPDX-License-Identifier: BSD 2-Clause License
#
import aiohttp
import asyncio
import io
from typing import AsyncGenerator, Optional
import aiohttp
from loguru import logger
from PIL import Image
from pydantic import BaseModel
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.utils.time import time_now_iso8601
from PIL import Image
from loguru import logger
# See .env.example for Azure configuration needed
try:
from azure.cognitiveservices.speech import (

View File

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

View File

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

View File

@@ -9,14 +9,12 @@ import base64
import io
import json
import httpx
from dataclasses import dataclass
from typing import Any, AsyncGenerator, Dict, List, Literal, Optional
from pydantic import BaseModel, Field
from loguru import logger
from PIL import Image
from pipecat.frames.frames import (
ErrorFrame,
Frame,
@@ -39,7 +37,6 @@ from pipecat.processors.aggregators.llm_response import (
LLMUserContextAggregator,
LLMAssistantContextAggregator,
)
from pipecat.processors.aggregators.openai_llm_context import (
OpenAILLMContext,
OpenAILLMContextFrame,
@@ -47,6 +44,10 @@ from pipecat.processors.aggregators.openai_llm_context import (
from pipecat.processors.frame_processor import FrameDirection
from pipecat.services.ai_services import ImageGenService, LLMService, TTSService
from PIL import Image
from loguru import logger
try:
from openai import AsyncOpenAI, AsyncStream, DefaultAsyncHttpxClient, BadRequestError, NOT_GIVEN
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 loguru import logger
import numpy as np
from loguru import logger
try:
import resampy
except ModuleNotFoundError as e: