From d42f072ff553bbfd416907967d1e5cc47f01665e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 22 Aug 2024 11:36:16 -0700 Subject: [PATCH] examples: fix studypal errors and update requirements --- CHANGELOG.md | 6 ++++++ examples/studypal/requirements.txt | 6 +++--- examples/studypal/runner.py | 6 +++--- examples/studypal/studypal.py | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de97fd6cd..218f16c1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix `FastAPIWebsocketOutputTransport` variable name clash with subclass. +- Fix an `AnthropicLLMService` issue with empty arguments in function calling. + +### Other + +- Fixed `studypal` example errors. + ## [0.0.40] - 2024-08-20 ### Added diff --git a/examples/studypal/requirements.txt b/examples/studypal/requirements.txt index 210c59ebc..2d6e21042 100644 --- a/examples/studypal/requirements.txt +++ b/examples/studypal/requirements.txt @@ -1,5 +1,5 @@ -beautifulsoup4==4.12.2 -PyPDF2==3.0.1 +beautifulsoup4==4.12.3 +pypdf==4.3.1 tiktoken==0.7.0 -pipecat-ai[daily,cartesia,openai,silero]==0.0.39 +pipecat-ai[daily,cartesia,openai,silero]==0.0.40 python-dotenv==1.0.1 diff --git a/examples/studypal/runner.py b/examples/studypal/runner.py index 949e46b59..068174eec 100644 --- a/examples/studypal/runner.py +++ b/examples/studypal/runner.py @@ -50,12 +50,12 @@ async def configure_with_args( daily_rest_helper = DailyRESTHelper( daily_api_key=key, daily_api_url=os.getenv("DAILY_API_URL", "https://api.daily.co/v1"), - ) + aiohttp_session=aiohttp_session) # Create a meeting token for the given room with an expiration 1 hour in # the future. expiry_time: float = 60 * 60 - token = daily_rest_helper.get_token(url, expiry_time) + token = await daily_rest_helper.get_token(url, expiry_time) - return (url, token, args) \ No newline at end of file + return (url, token, args) diff --git a/examples/studypal/studypal.py b/examples/studypal/studypal.py index 67b02a9fb..8adfe2954 100644 --- a/examples/studypal/studypal.py +++ b/examples/studypal/studypal.py @@ -5,7 +5,7 @@ import io from bs4 import BeautifulSoup -from PyPDF2 import PdfReader +from pypdf import PdfReader import tiktoken from pipecat.frames.frames import LLMMessagesFrame