From 1688f6dfc5aadd909f3237091208b9a62172c516 Mon Sep 17 00:00:00 2001 From: Dirk Brand <51947788+dirkbrnd@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:18:54 +0200 Subject: [PATCH] Release 2.7.4 (#1600) ## Description This releases 2.7.4. ** Changelog ** This release enhances multimodal capabilities with audio support, improves session page performance, and fixes various bugs for better stability and usability. **New Features** - Audio Response Support: Added support for audio responses, enhancing multimodal interaction capabilities. - Audio Generation Tools: Integrated Eleven Labs for Audio Generation. - Cohere Embedder: Introduced a new Cohere Embedder class with a corresponding cookbook example to demonstrate its usage. - JSON and YAML Agent Storage: Now you can persist your data locally in JSON and YAML extension files **Improvements** - Version Checker for OpenAI: Added a warning for users with OpenAI versions below 1.52.0 to ensure compatibility with features like audio in ChatCompletionMessage. - Agent Response Handling: Enhanced processing of agent responses to support lists, improving handling of multi-item outputs. **Bug Fixes** - AWS Bedrock Tool Descriptions: Fixed an issue where the transfer tool description was missing, causing incompatibility with AWS Bedrock Claude. - Response Content Handling: Resolved crashes on the session page caused by non-string response content. - Deep Copy Agent Memory: Addressed deep copy errors when using agent memory on the playground. - Session Page Enhancements: Fixed the refresh button - Fix Tool Parsing for Ollama: Fixed JSON schema tool parsing by transforming ['string', 'null'] parameters to 'string' for compatibility. - Response Parsing for Gemini Tool: Improved response parsing to handle unserializable objects in tool_calls for Gemini on the playground. - Memory Handling for Google Provider: Fixed an issue in monitoring_data where memory was removed for all providers, causing blank titles on Phidata.app; now only modifies memory for Google provider. - RecursiveChunking ID Conflict: Resolved an issue in RecursiveChunking where processing large files with multiple chunks caused duplicate chunk record IDs, leading to psycopg.errors.UniqueViolation. --------- Co-authored-by: Anurag --- phi/model/openai/chat.py | 1 - pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/phi/model/openai/chat.py b/phi/model/openai/chat.py index 041ab5fc9..7b6256cb9 100644 --- a/phi/model/openai/chat.py +++ b/phi/model/openai/chat.py @@ -925,7 +925,6 @@ async def aresponse_stream(self, messages: List[Message]) -> Any: # -*- Generate response metrics.response_timer.start() async for response in self.ainvoke_stream(messages=messages): - if response.choices and len(response.choices) > 0: metrics.completion_tokens += 1 if metrics.completion_tokens == 1: diff --git a/pyproject.toml b/pyproject.toml index e6000c9e8..dbefd4499 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "phidata" -version = "2.7.3" +version = "2.7.4" description = "Build multi-modal Agents with memory, knowledge and tools." requires-python = ">=3.7" readme = "README.md"