Skip to content

Created /ask command with AI provider architecture#109

Draft
Wikijito7 wants to merge 7 commits into
masterfrom
feature/30-ask-command
Draft

Created /ask command with AI provider architecture#109
Wikijito7 wants to merge 7 commits into
masterfrom
feature/30-ask-command

Conversation

@Wikijito7

Copy link
Copy Markdown
Owner

Solves #30

📋 Changelist Summary

Created /ask command that sends prompts to an AI API via a provider-agnostic architecture and generates TTS with the answer.

💬 Description

  • Provider-agnostic interface: AIProvider strategy pattern (HuggingFaceProvider as primary, DuckAIProvider ready for future).
  • /ask <prompt> slash command: Sends prompt to AI, responds with the answer in Discord + TTS in voice channel.
  • Message context menu ("Ask AI"): Right-click any message → sends its content as prompt.
  • HuggingFace Inference API: Uses Ktor directly (no HuggingFace library), OpenAI-compatible endpoint.
  • Architecture: Follows existing project patterns (Koin DI, Command interface, LocalizationService, GuildQueueService, TTSService).

Note: Duck.ai PoC was built and proven to work (JS challenge solved in Node.js), but fingerprint emulation makes it fragile. The interface is ready for it when the API stabilizes.

ℹ️ Extra info

This PR was created using AI. Please review carefully before merging.

🐵 AI-Generated PR Disclaimer

This pull request was created with assistance from AI. While the code compiles successfully and all existing tests pass, please review the implementation carefully for correctness, security, and alignment with project conventions before merging.

@sonarqubecloud

Copy link
Copy Markdown

@Wikijito7 Wikijito7 linked an issue Jun 21, 2026 that may be closed by this pull request
4 tasks
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.

Create /ask command

1 participant