Open sshivaditya2019 opened 1 week ago
@ubosshivaditya I want to get started on this issue, can you explain what steps I should take ?
To get started on Issue #137, follow these steps:
Review Existing Work:
gram-js
library in Issue #25 for creating Telegram channels via a dedicated user account. This approach bypasses the limitation where bots cannot create channels directly.Set Up the Telegram Bot:
gram-js
:
gram-js
.Implement Workroom Creation:
issues.labeled
to detect when a task is initiated.Create Telegram Group Chat:
gram-js
to programmatically create a new Telegram group chat for the task.
const { TelegramClient } = require('gram-js');
// Initialize client with session string
const client = new TelegramClient(session, apiId, apiHash, { connectionRetries: 5 });
await client.connect(); const group = await client.createChannel('Workroom for Task #137', 'Collaborative workroom for Issue #137'); const inviteLink = await client.exportChatInviteLink(group);
const commentBody = `A collaborative workroom has been created: ${inviteLink}`;
await octokit.issues.createComment({
owner: 'sshivaditya2019',
repo: 'test-public',
issue_number: 137,
body: commentBody,
});
Automate Task Completion Handling:
const summary = await chatGPT.summarizeChat(groupId);
await octokit.issues.createComment({
owner: 'sshivaditya2019',
repo: 'test-public',
issue_number: 137,
body: `**Conversation Summary:**\n${summary}`,
});
const participants = await client.getParticipants(group);
for (const user of participants) {
await client.kickParticipant(group, user.id);
}
await client.deleteChannel(group);
Database Management:
taskTitle
, chatId
, and embeddings
.tasks:
- taskTitle: "Issue #137"
chatId: "https://t.me/teeest132/58"
embeddings: "..."
Testing and Validation:
Documentation and Setup:
plugins
section in your YAML configuration includes the Telegram agent.
plugins:
- uses:
- plugin: ubiquity-os-marketplace/ubiquity-os-agent
with:
target: ubiquity-os-agent
Collaboration and Support:
By following these steps, you will establish a robust integration between GitHub and Telegram, enhancing team collaboration and maintaining an auditable record of project discussions.
@ubosshivaditya can you tell me where you found out about team member @FernandVEYRIER ?
@ubosshivaditya can you tell me where you found out about team member @FernandVEYRIER ?
I found out about team member @FernandVEYRIER from the discussions in Issue #137 and its linked Issue #25 within the ubiquity-os/plugins-wishlist repository. Specifically, @FernandVEYRIER was mentioned in the context of organizing collaborative workrooms and managing team collaborations effectively. You can refer to the original reference in Issue #25 for more detailed information.
The response doesn't make sense to me as I don't see the reference in that issue. I would like to see the full context passed in.
In addition some of those links don't work as expected. I can pitch ideas when I see the full context passed in.
I messaged you on telegram @sshivaditya2019
@0x4007 I think this is the context that's being passed into the model right now
{
'ubiquity-os/plugins-wishlist/25': 'I realize that some projects require collaboration, and our team has a natural tendency to direct message each other. The problem with this approach is that the collaborative research in direct messages is not auditable. The conversation that occurred would be useful for future reference to post a summary to the completed task. \n' +
'\n' +
'It would be nice if as soon as a task is started, the bot can post a link to a freshly generated telegram chat room that acts as a collaborative "work room" to solve that particular task \n' +
'\n' +
'Once the task is closed as complete, we can use ChatGPT to summarize the essential details from the telegram group chat and post it to the GitHub issue as a conversation summary for future reference \n' +
'\n' +
"Inventing the telegram integration will probably take some time so I'll set this to a week.\n" +
'\n' +
'---\n' +
'\n' +
"It would be nice to get automatically kicked from the chat when the task is completed so that our telegrams don't get cluttered with these. ",
'sshivaditya2019/test-public/137': 'I realize that some projects require collaboration, and our team has a natural tendency to direct message each other. The problem with this approach is that the collaborative research in direct messages is not auditable. The conversation that occurred would be useful for future reference to post a summary to the completed task.\r\n' +
'\r\n' +
'It would be nice if as soon as a task is started, the bot can post a link to a freshly generated telegram chat room that acts as a collaborative "work room" to solve that particular task\r\n' +
'\r\n' +
'Once the task is closed as complete, we can use ChatGPT to summarize the essential details from the telegram group chat and post it to the GitHub issue as a conversation summary for future reference\r\n' +
'\r\n' +
"Inventing the telegram integration will probably take some time so I'll set this to a week.\r\n" +
'\r\n' +
"It would be nice to get automatically kicked from the chat when the task is completed so that our telegrams don't get cluttered with these.\r\n" +
'\r\n' +
'[Originally Referred To in](https://www.github.com/ubiquity-os/plugins-wishlist/issues/25#issue-2371338962)\r\n'
} {
'sshivaditya2019/test-public/137': [
{
user: 'sshivaditya2019',
body: '@ubosshivaditya I want to get started on this issue, can you explain what steps I should take ?',
id: 2401359982,
org: 'sshivaditya2019',
repo: 'test-public',
issueUrl: 'https://github.com/sshivaditya2019/test-public/issues/137#issuecomment-2401359982'
},
{
user: '0x4007',
body: '@ubosshivaditya can you tell me where you found out about team member @FernandVEYRIER ?',
id: 2401398596,
org: 'sshivaditya2019',
repo: 'test-public',
issueUrl: 'https://github.com/sshivaditya2019/test-public/issues/137#issuecomment-2401398596'
},
{
user: 'sshivaditya2019',
body: '@ubosshivaditya can you tell me where you found out about team member @FernandVEYRIER ?',
id: 2401409026,
org: 'sshivaditya2019',
repo: 'test-public',
issueUrl: 'https://github.com/sshivaditya2019/test-public/issues/137#issuecomment-2401409026'
},
{
user: 'sshivaditya2019',
body: 'I realize that some projects require collaboration, and our team has a natural tendency to direct message each other. The problem with this approach is that the collaborative research in direct messages is not auditable. The conversation that occurred would be useful for future reference to post a summary to the completed task.\r\n' +
'\r\n' +
'It would be nice if as soon as a task is started, the bot can post a link to a freshly generated telegram chat room that acts as a collaborative "work room" to solve that particular task\r\n' +
'\r\n' +
'Once the task is closed as complete, we can use ChatGPT to summarize the essential details from the telegram group chat and post it to the GitHub issue as a conversation summary for future reference\r\n' +
'\r\n' +
"Inventing the telegram integration will probably take some time so I'll set this to a week.\r\n" +
'\r\n' +
"It would be nice to get automatically kicked from the chat when the task is completed so that our telegrams don't get cluttered with these.\r\n" +
'\r\n' +
'[Originally Referred To in](https://www.github.com/ubiquity-os/plugins-wishlist/issues/25#issue-2371338962)\r\n',
id: 2574815054,
org: 'sshivaditya2019',
repo: 'test-public',
issueUrl: 'https://github.com/sshivaditya2019/test-public/issues/137'
},
{
user: 'sshivaditya2019',
body: '@ubosshivaditya I want to get started on this issue, can you explain what steps I should take ?',
id: 2401359982,
org: 'sshivaditya2019',
repo: 'test-public',
issueUrl: 'https://github.com/sshivaditya2019/test-public/issues/137#issuecomment-2401359982'
},
{
user: '0x4007',
body: '@ubosshivaditya can you tell me where you found out about team member @FernandVEYRIER ?',
id: 2401398596,
org: 'sshivaditya2019',
repo: 'test-public',
issueUrl: 'https://github.com/sshivaditya2019/test-public/issues/137#issuecomment-2401398596'
},
{
user: 'sshivaditya2019',
body: '@ubosshivaditya can you tell me where you found out about team member @FernandVEYRIER ?',
id: 2401409026,
org: 'sshivaditya2019',
repo: 'test-public',
issueUrl: 'https://github.com/sshivaditya2019/test-public/issues/137#issuecomment-2401409026'
},
{
user: 'sshivaditya2019',
body: 'I realize that some projects require collaboration, and our team has a natural tendency to direct message each other. The problem with this approach is that the collaborative research in direct messages is not auditable. The conversation that occurred would be useful for future reference to post a summary to the completed task.\r\n' +
'\r\n' +
'It would be nice if as soon as a task is started, the bot can post a link to a freshly generated telegram chat room that acts as a collaborative "work room" to solve that particular task\r\n' +
'\r\n' +
'Once the task is closed as complete, we can use ChatGPT to summarize the essential details from the telegram group chat and post it to the GitHub issue as a conversation summary for future reference\r\n' +
'\r\n' +
"Inventing the telegram integration will probably take some time so I'll set this to a week.\r\n" +
'\r\n' +
"It would be nice to get automatically kicked from the chat when the task is completed so that our telegrams don't get cluttered with these.\r\n" +
'\r\n' +
'[Originally Referred To in](https://www.github.com/ubiquity-os/plugins-wishlist/issues/25#issue-2371338962)\r\n',
id: 2574815054,
org: 'sshivaditya2019',
repo: 'test-public',
issueUrl: 'https://github.com/sshivaditya2019/test-public/issues/137'
}
],
'ubiquity-os/plugins-wis
hlist/25': [
{
user: 'jordan-ae',
body: '/start',
id: 2213549171,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2213549171'
},
{
user: 'jordan-ae',
body: '/start',
id: 2275657755,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2275657755'
},
{
user: 'DivineDB',
body: '/start\r\n',
id: 2282009745,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2282009745'
},
{
user: 'jordan-ae',
body: "@0x4007 I encountered a blocker with the Telegram integration plugin. Initially, the plan was to create a bot using BotFather, similar to our previous Telegram bot. However, according to Telegram's latest documentation, bots are unable to create Telegram channels—only human users can do this, likely to prevent spamming.\r\n" +
'\r\n' +
'To work around this limitation, I opted to use the gram-js library, which allows us to create channels via a Telegram app associated with an existing user account. The challenge here is that Telegram requires a phone number for authentication and sends a code that must be manually entered to pass 2FA. Fortunately, this authentication process only needs to be done once. After the first successful authentication, a session string is generated. This session string remains valid indefinitely unless explicitly revoked, so we won’t need to re-authenticate in the future.\r\n' +
'\r\n' +
"Given this requirement, we'll probably have to create a dedicated Telegram user for Ubiquity, which will be used to power the plugin.\r\n" +
'\r\n' +
"I've made some progress and have successfully managed to create a Telegram channel when a task starts and close/delete the channel when the task is completed. I'm submitting a PR with the current state of the implementation asap.",
id: 2292519196,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2292519196'
},
{
user: '0x4007',
body: 'https://t.me/UbiquityOS is ready to be used. ',
id: 2292573891,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2292573891'
},
{
user: 'Keyrxng',
body: 'QA: https://github.com/ubq-testing/telegram-bot/issues/4#issuecomment-2321198296\r\n' +
'\r\n' +
"It is not based on https://github.com/ubiquity/ubiquibot-telegram at all and uses the `plugin-template` as a foundation. I'll create a repo I can PR against as it looks like the one I made was deleted (I'm confident that I did make it)",
id: 2321206219,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2321206219'
},
{
user: '0x4007',
body: 'Perhaps there is an opportunity to use Telegram apps to solve this problem somehow. ',
id: 2322888727,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2322888727'
},
{
user: 'Keyrxng',
body: '> Perhaps there is an opportunity to use Telegram apps to solve this problem somehow.\r\n' +
'\r\n' +
"That's essentially what I have been trying I'm sure as the MTProto API is for clients and apps as far as I understand it while the `Bot` API is a simplified rest api.\r\n" +
'\r\n' +
'or do you mean [mini apps](https://core.telegram.org/bots/webapps)? ',
id: 2322892673,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2322892673'
},
{
user: 'Keyrxng',
body: '0x4007 via telegram:\r\n' +
'\r\n' +
'> 1. Bot makes group chat\r\n' +
'> 2. Bot posts link when task is priced. \r\n' +
'> 3. Task is closed and bot kicks everybody from group chat\r\n' +
'> People manually join by using the link\r\n' +
'\r\n' +
'---\r\n' +
'\r\n' +
"So a new issue is created and after a price label is applied the bot creates a workroom, which is it's own telegram group chat and it posts a link to it.\r\n" +
'\r\n' +
"At this point no one is in it so the core team member(s) assigning the labels and creating the task should be required to join the workroom immediately so there is at least one person in it in the event a contributor joins it. So they'd effectively be the 'knowledge base' for that task via telegram pretty much?\r\n" +
'\r\n' +
'Should our telegram bot also be invited into the chat directly too?\r\n' +
'\r\n' +
'---\r\n' +
'\r\n' +
"We'll need to create db entry for each chat that we create and have the plugin event run on `issues.labeled` or similar as `issues.opened` doesn't work with this approach. We'd check if a chat exists in supabase for that task, create if not. So for every new issue we'll need to store `taskTitle, chatId, embeddings`. \r\n" +
'\r\n' +
'If we kick everyone from the chat once the issue is complete and then the issue is reopened should we post a new chatroom link or the same link for the original chat?\r\n' +
'\r\n' +
'Should we standardize workroom titles with a prefix/format or just use the raw task title? ',
id: 2322896318,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2322896318'
},
{
user: '0x4007',
body: 'It seems that our base rate multiplier for priority levels must have been reset to default since the bot upgrade. ',
id: 2339532994,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2339532994'
},
{
user: 'Immanuel-john',
body: 'hi @0x4007 is this bounty still open to contribute? Our team got expertise in developing telegram bots and miniapps',
id: 2395056727,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2395056727'
},
{
user: 'anonyphoenix',
body: "It's probably not a very good idea because bots can't create chat groups. Only user accounts can. Although you can automate user account actions with MTProto, Telegram rate-limits creating chat groups and also has some limits on the number of groups a user can create.",
id: 2400821940,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/u
biquity-os/plugins-wishlist/issues/25#issuecomment-2400821940'
},
{
user: 'jordan-ae',
body: '/start',
id: 2213549171,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2213549171'
},
{
user: 'jordan-ae',
body: '/start',
id: 2275657755,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2275657755'
},
{
user: 'DivineDB',
body: '/start\r\n',
id: 2282009745,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2282009745'
},
{
user: 'jordan-ae',
body: "@0x4007 I encountered a blocker with the Telegram integration plugin. Initially, the plan was to create a bot using BotFather, similar to our previous Telegram bot. However, according to Telegram's latest documentation, bots are unable to create Telegram channels—only human users can do this, likely to prevent spamming.\r\n" +
'\r\n' +
'To work around this limitation, I opted to use the gram-js library, which allows us to create channels via a Telegram app associated with an existing user account. The challenge here is that Telegram requires a phone number for authentication and sends a code that must be manually entered to pass 2FA. Fortunately, this authentication process only needs to be done once. After the first successful authentication, a session string is generated. This session string remains valid indefinitely unless explicitly revoked, so we won’t need to re-authenticate in the future.\r\n' +
'\r\n' +
"Given this requirement, we'll probably have to create a dedicated Telegram user for Ubiquity, which will be used to power the plugin.\r\n" +
'\r\n' +
"I've made some progress and have successfully managed to create a Telegram channel when a task starts and close/delete the channel when the task is completed. I'm submitting a PR with the current state of the implementation asap.",
id: 2292519196,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2292519196'
},
{
user: '0x4007',
body: 'https://t.me/UbiquityOS is ready to be used. ',
id: 2292573891,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2292573891'
},
{
user: 'Keyrxng',
body: 'QA: https://github.com/ubq-testing/telegram-bot/issues/4#issuecomment-2321198296\r\n' +
'\r\n' +
"It is not based on https://github.com/ubiquity/ubiquibot-telegram at all and uses the `plugin-template` as a foundation. I'll create a repo I can PR against as it looks like the one I made was deleted (I'm confident that I did make it)",
id: 2321206219,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2321206219'
},
{
user: '0x4007',
body: 'Perhaps there is an opportunity to use Telegram apps to solve this problem somehow. ',
id: 2322888727,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2322888727'
},
{
user: 'Keyrxng',
body: '> Perhaps there is an opportunity to use Telegram apps to solve this problem somehow.\r\n' +
'\r\n' +
"That's essentially what I have been trying I'm sure as the MTProto API is for clients and apps as far as I understand it while the `Bot` API is a simplified rest api.\r\n" +
'\r\n' +
'or do you mean [mini apps](https://core.telegram.org/bots/webapps)? ',
id: 2322892673,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2322892673'
},
{
user: 'Keyrxng',
body: '0x4007 via telegram:\r\n' +
'\r\n' +
'> 1. Bot makes group chat\r\n' +
'> 2. Bot posts link when task is priced. \r\n' +
'> 3. Task is closed and bot kicks everybody from group chat\r\n' +
'> People manually join by using the link\r\n' +
'\r\n' +
'---\r\n' +
'\r\n' +
"So a new issue is created and after a price label is applied the bot creates a workroom, which is it's own telegram group chat and it posts a link to it.\r\n" +
'\r\n' +
"At this point no one is in it so the core team member(s) assigning the labels and creating the task should be required to join the workroom immediately so there is at least one person in it in the event a contributor joins it. So they'd effectively be the 'knowledge base' for that task via telegram pretty much?\r\n" +
'\r\n' +
'Should our telegram bot also be invited into the chat directly too?\r\n' +
'\r\n' +
'---\r\n' +
'\r\n' +
"We'll need to create db entry for each chat that we create and have the plugin event run on `issues.labeled` or similar as `issues.opened` doesn't work with this approach. We'd check if a chat exists in supabase for that task, create if not. So for every new issue we'll need to store `taskTitle, chatId, embeddings`. \r\n" +
'\r\n' +
'If we kick everyone from the chat once the issue is complete and then the issue is reopened should we post a new chatroom link or the same link for the original chat?\r\n' +
'\r\n' +
'Should we standardize workroom titles with a prefix/format or just use the raw task title? ',
id: 2322896318,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2322896318'
},
{
user: '0x4007',
body: 'It seems that our base rate multiplier for priority levels must have been reset to default since the bot upgrade. ',
id: 2339532994,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2339532994'
},
{
user: 'Immanuel-john',
body: 'hi @0x4007 is this bounty still open to contribute? Our team got expertise in developing telegram bots and miniapps',
id: 2395056727,
org: 'ubiquity-os',
repo: 'plugins-wishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2395056727'
},
{
user: 'anonyphoenix',
body: "It's probably not a very good idea because bots can't create chat groups. Only user accounts can. Although you can automate user account actions with MTProto, Telegram rate-limits creating chat groups and also has some limits on the number of groups a user can create.",
id: 2400821940,
org: 'ubiquity-os',
repo: 'plugins-w
ishlist',
issueUrl: 'https://github.com/ubiquity-os/plugins-wishlist/issues/25#issuecomment-2400821940'
}
]
} [
'sshivaditya2019/test-public/137',
'ubiquity-os/plugins-wishlist/25'
]
I can't say with 100% confidence but I think it's a bad idea to include all the json notation in the prompt. At least it wastes tokens.
You should consider extracting and including only the relevant values in a plaintext format
I can't say with 100% confidence but I think it's a bad idea to include all the json notation in the prompt. At least it wastes tokens.
You should consider extracting and including only the relevant values in a plaintext format
This isn't the actual context but rather a more human-readable version. The final context is even more compressed. However, for some cases, we're reviewing all the comments and issues in PRs, which is beneficial, but it's leading us to approach 456K tokens in context for certain issue inputs.
How can we approach anything greater than 128k? That's the limit. And a portion of that is internally used for reasoning. Without looking it up, I suspect that we would want to target no more than 64k for o1-mini
I realize that some projects require collaboration, and our team has a natural tendency to direct message each other. The problem with this approach is that the collaborative research in direct messages is not auditable. The conversation that occurred would be useful for future reference to post a summary to the completed task.
It would be nice if as soon as a task is started, the bot can post a link to a freshly generated telegram chat room that acts as a collaborative "work room" to solve that particular task
Once the task is closed as complete, we can use ChatGPT to summarize the essential details from the telegram group chat and post it to the GitHub issue as a conversation summary for future reference
Inventing the telegram integration will probably take some time so I'll set this to a week.
It would be nice to get automatically kicked from the chat when the task is completed so that our telegrams don't get cluttered with these.
Originally Referred To in