Merge pull request #1967 from counterleft/unused-http-client-session
Remove instantiation of unused http client session from certain examples
This commit is contained in:
@@ -77,7 +77,6 @@ async def configure_livekit():
|
||||
|
||||
|
||||
async def main():
|
||||
async with aiohttp.ClientSession() as session:
|
||||
(url, token, room_name) = await configure_livekit()
|
||||
|
||||
transport = LiveKitTransport(
|
||||
|
||||
@@ -82,8 +82,6 @@ transport_params = {
|
||||
async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_sigint: bool):
|
||||
logger.info(f"Starting bot")
|
||||
|
||||
# Create an HTTP session for API calls
|
||||
async with aiohttp.ClientSession() as session:
|
||||
llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"))
|
||||
|
||||
messages = [
|
||||
@@ -133,6 +131,7 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si
|
||||
"show_video_container": False,
|
||||
"show_debug_container": False,
|
||||
}
|
||||
|
||||
rtvi_frame = RTVIServerMessageFrame(data=messages)
|
||||
await task.queue_frames([rtvi_frame])
|
||||
|
||||
|
||||
@@ -92,8 +92,6 @@ transport_params = {
|
||||
async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_sigint: bool):
|
||||
logger.info(f"Starting bot")
|
||||
|
||||
# Create an HTTP session for API calls
|
||||
async with aiohttp.ClientSession() as session:
|
||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||
|
||||
llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"))
|
||||
|
||||
Reference in New Issue
Block a user