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

Add a /query command. #28

Merged
merged 7 commits into from
Feb 1, 2025
Merged

Conversation

RealistikDash
Copy link
Contributor

This implements the /query slash command to allow you to quickly run queries without the need for context. This is aimed at being used in environments where the bot/you don't have access to threads (such as DMs and group chats).

Long-term, this would consider some per-user context (maybe 5 messages).

On top of this, it genericises some of the API to be more re-usable (such as smart message splitting and the GPT query loop).

Note

This does not integrate with the cost count implemented as the logic there was too thread-focused to be done simply.

Also completely untested.

@RealistikDash RealistikDash requested a review from cmyui as a code owner January 31, 2025 14:51

output_messages.append(message_chunk)

return output_messages
Copy link
Member

Choose a reason for hiding this comment

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

wondering if we should use this everywhere?

else:
messages_to_send = result.response_messages

# I have no idea whether they actually allow you to send multiple follow-ups.
Copy link
Member

Choose a reason for hiding this comment

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

i would kill u for these comment in a workplace rofl

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I lost it at the “completely untested” bit

@cmyui cmyui changed the base branch from master to realistik-changes February 1, 2025 00:43
@cmyui cmyui merged commit a63b27b into osuAkatsuki:realistik-changes Feb 1, 2025
1 check 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.

2 participants