Skip to content

Commit

Permalink
implementing John's feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
stat committed Nov 7, 2024
1 parent 185b34f commit 60396f7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@

import tweepy
from pydantic import BaseModel
from pydantic import BaseModel, Field

ACCOUNT_DETAILS_PROMPT = """
This tool will return account details for the authenticated user context."""
This tool will return account details for the currently authenticated Twitter (X) user context."""

class AccountDetailsInput(BaseModel):
"""Input argument schema for Twitter account details action."""

no_input: str = Field(
"",
description="No input required, e.g. `` (empty string).",
)

def account_details(client: tweepy.Client) -> str:
""".
"""Get the authenticated Twitter (X) user account details.
Returns:
str: A message containing account details for the authenticated user context.
Expand Down
16 changes: 8 additions & 8 deletions twitter-langchain/examples/account_details/account_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
# Name: account_details

# Successfully retrieved authenticated user account details. Please present the following as json and not markdown:
# id: [REDACTED]
# name: [REDACTED]
# username: [REDACTED]
# link: [REDACTED]
# id: 1234567890123456789
# name: My Twitter Name
# username: MyTwitterUserName
# link: https://x.com/MyTwitterUserName
# ================================== Ai Message ==================================
# {
# "id": "[REDACTED]",
# "name": "[REDACTED]",
# "username": "[REDACTED]",
# "link": "[REDACTED]"
# "id": "1234567890123456789",
# "name": "My Twitter Name",
# "username": "MyTwitterUserName",
# "link": "https://x.com/MyTwitterUserName"
# }
2 changes: 1 addition & 1 deletion twitter-langchain/twitter_langchain/twitter_api_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def validate_environment(cls, values: dict) -> Any:
return values

def account_details_wrapper(self) -> str:
""".
"""Get the authenticated Twitter (X) user account details.
Returns:
str: A message containing account details for the authenticated user context in JSON format.
Expand Down

0 comments on commit 60396f7

Please sign in to comment.