Skip to content

Chore/bump langchain version #716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/guides/publish_petercat-utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message and solution provided here are useful, but ensure that the Twine version is compatible with other parts of your project to avoid potential conflicts.

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:
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "petercat_utils"
version = "0.1.41"
version = "0.1.42"
description = ""
authors = ["raoha.rh <raohai.rh@antgroup.com>"]
readme = "README.md"
Expand All @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions server/agent/llm/clients/deepseek.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
return [c.model_dump() for c in content]
6 changes: 3 additions & 3 deletions server/agent/llm/clients/gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]
2 changes: 1 addition & 1 deletion server/agent/llm/clients/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
6 changes: 3 additions & 3 deletions server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,5 +27,5 @@ requests
pytest
httpx
urllib3>=2.2.2
petercat_utils>=0.1.36
petercat_utils>=0.1.42
toolz
Loading