diff --git a/docs/guides/publish_petercat-utils.md b/docs/guides/publish_petercat-utils.md index 4fe23e5b..15adddb8 100644 --- a/docs/guides/publish_petercat-utils.md +++ b/docs/guides/publish_petercat-utils.md @@ -24,8 +24,17 @@ npm run build:pypi Make sure your have the latest version of twine installed: +> Uploading distributions to https://upload.pypi.org/legacy/ +ERROR InvalidDistribution: Metadata is missing required fields: Name, Version. + Make sure the distribution includes the files where those fields are + specified, and is using a supported Metadata-Version: 1.0, 1.1, 1.2, + 2.0, 2.1, 2.2. + +Once the error occurs, ensure that the Twine version is 6.0.1. +For more details, refer to the issue here: https://github.com/pypi/warehouse/issues/15611. + ```bash -pip install twine +pip install twine==6.0.1 ``` Publish it: diff --git a/pyproject.toml b/pyproject.toml index a855c8f1..40232495 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "petercat_utils" -version = "0.1.41" +version = "0.1.42" description = "" authors = ["raoha.rh "] readme = "README.md" @@ -22,10 +22,10 @@ md_report_color = "auto" [tool.poetry.dependencies] python = "^3.9" -langchain_community = "^0.2.11" -langchain_openai = "^0.1.20" -langchain_core = "^0.2.28" -langchain = "^0.2.12" +langchain_community = ">=0.3,<0.4" +langchain_openai = "0.3.3" +langchain_core = ">=0.3,<0.4" +langchain = ">=0.3,<0.4" supabase = "2.6.0" pydantic = ">=2.7.0,<3" PyGithub = "2.3.0" diff --git a/server/agent/llm/clients/deepseek.py b/server/agent/llm/clients/deepseek.py index 4403f263..cef875aa 100644 --- a/server/agent/llm/clients/deepseek.py +++ b/server/agent/llm/clients/deepseek.py @@ -45,5 +45,4 @@ def get_tools(self, tools: List[Any]): return [convert_to_openai_tool(tool) for tool in tools] def parse_content(self, content: List[MessageContent]): - print(f"parse_conent, content={content}") - return content \ No newline at end of file + return [c.model_dump() for c in content] \ No newline at end of file diff --git a/server/agent/llm/clients/gemini.py b/server/agent/llm/clients/gemini.py index cbcac752..f0b28830 100644 --- a/server/agent/llm/clients/gemini.py +++ b/server/agent/llm/clients/gemini.py @@ -17,6 +17,8 @@ def parse_gemini_input(message: MessageContent): return ImageRawURLContentBlock( image_url=message.image_url.url, type="image_url" ) + case "text": + return message.model_dump() case _: return message @@ -51,6 +53,4 @@ def get_tools(self, tools: List[Any]): return [convert_to_genai_function_declarations(tool) for tool in tools] def parse_content(self, content: List[MessageContent]): - result = [parse_gemini_input(message=message) for message in content] - print(f"parse_content, content={content}, result={result}") - return result + return [parse_gemini_input(message=message) for message in content] diff --git a/server/agent/llm/clients/openai.py b/server/agent/llm/clients/openai.py index e1ea597a..5c722c0e 100644 --- a/server/agent/llm/clients/openai.py +++ b/server/agent/llm/clients/openai.py @@ -42,4 +42,4 @@ def get_tools(self, tools: List[Any]): return [convert_to_openai_tool(tool) for tool in tools] def parse_content(self, content: List[MessageContent]): - return content + return [c.model_dump() for c in content] diff --git a/server/requirements.txt b/server/requirements.txt index a1791e31..f268e450 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -4,8 +4,8 @@ python-dotenv==1.0.0 openai mangum langserve -langchain_community>=0.2.11 -langchain>=0.2.12 +langchain_community>=0.3,<0.4 +langchain>=0.3,<0.4 langchain_google_genai PyGithub==2.3.0 GitPython>=3.1.43 @@ -27,5 +27,5 @@ requests pytest httpx urllib3>=2.2.2 -petercat_utils>=0.1.36 +petercat_utils>=0.1.42 toolz