-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feature/shares #43
Feature/shares #43
Conversation
@pjbedard: One change I did make locally you might want to import was to avoid adding a dependency for import random
import string
def generate_share_id():
return '-'.join(''.join(random.choices(string.ascii_lowercase, k=3)) for _ in range(3)) |
@samj I made the change. Interestingly, it causes the sonarcloud check to fail. (cue sad thrombone) |
|
@pjbedard: SonarCloud isn't happy because I used
Here's what ChatGPT had to say on the subject. Apologies for getting this wrong — better we discovered it now than later. |
Looks like you've already fixed the random source by going for |
Implementation of Shares, unique short URLs that facilitate sharing links to bots/assistants.
Shares are created for a specific bot (Resource object), and may have an optional expiration date/time. This will generate a short URL tag (eg: abc-def-ghi) that can be passed back to pAI-OS by prefixing it with "r/" (eg https://host:port/r/abc-def-ghi) to trigger redirection to the bot's URI. Shares can be used for redirection until their expiration date or until they are manually revoked.