Skip to content

Show number of messages sent this month #44

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 5 commits into from
May 3, 2025

Conversation

4geru
Copy link
Contributor

@4geru 4geru commented Apr 29, 2025

Hello! This is 4geru.
I added the Push API Limit tool. Also, the use case is in the screenshot.

スクリーンショット 2025-05-01 0 41 47
previous

image

@4geru 4geru force-pushed the add-push-api-limit-tool branch from cac3f65 to b7eda0e Compare April 29, 2025 01:32
@4geru
Copy link
Contributor Author

4geru commented Apr 30, 2025

@Yang-33 @eucyt Hello! This PR is ready for review 🙇. Please review and provide feedback. onegaishimasu.

@Yang-33 Yang-33 requested a review from eucyt April 30, 2025 07:16
@Yang-33 Yang-33 changed the title add Push API limit tool Show number of messages sent this month Apr 30, 2025
src/index.ts Outdated
Comment on lines 217 to 234
"push_api_limit",
"Push message API is limited messages per month. This tool provides the current limit and remaining quota.",
{},
async () => {
const response = await messagingApiClient.getMessageQuota();
return {
content: [
{
type: "text",
text: JSON.stringify(response),
},
],
};
},
);

server.tool(
"push_api_total_usage",
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not limited to push; it includes push + multicast + narrowcast + broadcast. How about considering it simply as a message quota?

src/index.ts Outdated
Comment on lines 216 to 234
server.tool(
"push_api_limit",
"Push message API is limited messages per month. This tool provides the current limit and remaining quota.",
{},
async () => {
const response = await messagingApiClient.getMessageQuota();
return {
content: [
{
type: "text",
text: JSON.stringify(response),
},
],
};
},
);

server.tool(
"push_api_total_usage",
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: Is it necessary to separate the tools?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool. There are no reason to split the tool 🤝

@@ -33,8 +33,17 @@ LINE公式アカウントとAI Agentを接続するために、LINE Messaging AP
- `message.contents.type` (enum): コンテナのタイプ。'bubble'は単一コンテナ、'carousel'は複数のスワイプ可能なバブルを示す。
5. **get_profile**
- LINEユーザーの詳細なプロフィール情報を取得する。表示名、プロフィール画像URL、ステータスメッセージ、言語を取得できる。
- **Inputs:**
- **入力:**
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you 🙏

@4geru 4geru force-pushed the add-push-api-limit-tool branch from 9f660b1 to f01557f Compare April 30, 2025 15:40
@4geru 4geru requested review from Yang-33 and eucyt April 30, 2025 15:41
@4geru
Copy link
Contributor Author

4geru commented Apr 30, 2025

@eucyt @Yang-33 Good morning ☀️ I updated the code 🤝

README.ja.md Outdated
Comment on lines 38 to 45
6. **push_api_limit**
- Push メッセージAPIは月間のメッセージ数に制限があります。このツールは現在の制限と残りの利用可能なメッセージ数を提供します。
- **入力:**
- なし
7. **push_api_total_usage**
- Push メッセージAPIの総使用量を確認します。このツールは送信されたメッセージの総数と残りの利用可能なメッセージ数を提供します。
- **入力:**
- なし
Copy link
Contributor

Choose a reason for hiding this comment

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

get_message_quota ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OMG.... Thanks for the comment ... 🙇 🙇

@4geru 4geru requested a review from Yang-33 May 1, 2025 12:11
@Yang-33 Yang-33 added this pull request to the merge queue May 3, 2025
Merged via the queue into line:main with commit 954cfc4 May 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants