Skip to content
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

[Sweep GHA Fix] Fix the failing GitHub Actions #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion libs/langchain/langchain/tools/github/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""

COMMENT_ON_ISSUE_PROMPT = """
This tool is useful when you need to comment on a GitHub issue. Simply pass in the issue number and the comment you would like to make. Please use this sparingly as we don't want to clutter the comment threads. **VERY IMPORTANT**: Your input to this tool MUST strictly follow these rules:
Important: Before using this tool, ensure that the environment variables workload_identity_provider or credentials_json are set. This tool is useful when you need to comment on a GitHub issue. Simply pass in the issue number and the comment you would like to make. Please use this sparingly as we don't want to clutter the comment threads. **VERY IMPORTANT**: Your input to this tool MUST strictly follow these rules:

- First you must specify the issue number as an integer
- Then you must place two newlines
Expand Down
4 changes: 3 additions & 1 deletion libs/langchain/langchain/tools/github/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
from langchain.callbacks.manager import CallbackManagerForToolRun
from langchain.pydantic_v1 import Field
from langchain.tools.base import BaseTool
from langchain.utilities.github import GitHubAPIWrapper
from langchain.utilities.github import GitHubAPIWrapper, Optional

Check failure on line 15 in libs/langchain/langchain/tools/github/tool.py

View workflow job for this annotation

GitHub Actions / lint / build (3.8)

Ruff (F811)

langchain/tools/github/tool.py:15:58: F811 Redefinition of unused `Optional` from line 10

Check failure on line 15 in libs/langchain/langchain/tools/github/tool.py

View workflow job for this annotation

GitHub Actions / lint / build (3.11)

Ruff (F811)

langchain/tools/github/tool.py:15:58: F811 Redefinition of unused `Optional` from line 10


class GitHubAction(BaseTool):
"""Tool for interacting with the GitHub API."""

api_wrapper: GitHubAPIWrapper = Field(default_factory=GitHubAPIWrapper)
mode: str
workload_identity_provider: str
credentials_json: str
name: str = ""
description: str = ""

Expand Down
Loading