Fix linting
This commit is contained in:
@@ -23,11 +23,11 @@ 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.openai_realtime_beta import (
|
from pipecat.services.openai_realtime_beta import (
|
||||||
|
InputAudioNoiseReduction,
|
||||||
InputAudioTranscription,
|
InputAudioTranscription,
|
||||||
OpenAIRealtimeBetaLLMService,
|
OpenAIRealtimeBetaLLMService,
|
||||||
SessionProperties,
|
|
||||||
SemanticTurnDetection,
|
SemanticTurnDetection,
|
||||||
InputAudioNoiseReduction
|
SessionProperties,
|
||||||
)
|
)
|
||||||
from pipecat.transports.services.daily import DailyParams, DailyTransport
|
from pipecat.transports.services.daily import DailyParams, DailyTransport
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ async def main():
|
|||||||
turn_detection=SemanticTurnDetection(),
|
turn_detection=SemanticTurnDetection(),
|
||||||
# Or set to False to disable openai turn detection and use transport VAD
|
# Or set to False to disable openai turn detection and use transport VAD
|
||||||
# turn_detection=False,
|
# turn_detection=False,
|
||||||
input_audio_noise_reduction=InputAudioNoiseReduction(type='near_field'),
|
input_audio_noise_reduction=InputAudioNoiseReduction(type="near_field"),
|
||||||
# tools=tools,
|
# tools=tools,
|
||||||
instructions="""Your knowledge cutoff is 2023-10. You are a helpful and friendly AI.
|
instructions="""Your knowledge cutoff is 2023-10. You are a helpful and friendly AI.
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ from pipecat.services.openai_realtime_beta import (
|
|||||||
AzureRealtimeBetaLLMService,
|
AzureRealtimeBetaLLMService,
|
||||||
InputAudioTranscription,
|
InputAudioTranscription,
|
||||||
SessionProperties,
|
SessionProperties,
|
||||||
TurnDetection,
|
|
||||||
)
|
)
|
||||||
from pipecat.transports.services.daily import DailyParams, DailyTransport
|
from pipecat.transports.services.daily import DailyParams, DailyTransport
|
||||||
|
|
||||||
|
|||||||
@@ -129,10 +129,23 @@ class BaseOpenAILLMService(LLMService):
|
|||||||
}
|
}
|
||||||
self.set_model_name(model)
|
self.set_model_name(model)
|
||||||
self._client = self.create_client(
|
self._client = self.create_client(
|
||||||
api_key=api_key, base_url=base_url, organization=organization, project=project, default_headers=default_headers, **kwargs
|
api_key=api_key,
|
||||||
|
base_url=base_url,
|
||||||
|
organization=organization,
|
||||||
|
project=project,
|
||||||
|
default_headers=default_headers,
|
||||||
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
def create_client(self, api_key=None, base_url=None, organization=None, project=None, default_headers=None, **kwargs):
|
def create_client(
|
||||||
|
self,
|
||||||
|
api_key=None,
|
||||||
|
base_url=None,
|
||||||
|
organization=None,
|
||||||
|
project=None,
|
||||||
|
default_headers=None,
|
||||||
|
**kwargs,
|
||||||
|
):
|
||||||
return AsyncOpenAI(
|
return AsyncOpenAI(
|
||||||
api_key=api_key,
|
api_key=api_key,
|
||||||
base_url=base_url,
|
base_url=base_url,
|
||||||
@@ -143,7 +156,7 @@ class BaseOpenAILLMService(LLMService):
|
|||||||
max_keepalive_connections=100, max_connections=1000, keepalive_expiry=None
|
max_keepalive_connections=100, max_connections=1000, keepalive_expiry=None
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
default_headers=default_headers
|
default_headers=default_headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
def can_generate_metrics(self) -> bool:
|
def can_generate_metrics(self) -> bool:
|
||||||
|
|||||||
Reference in New Issue
Block a user