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

feat(chat): Add API to summarize chat messages #13661

Merged
merged 4 commits into from
Nov 14, 2024

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Oct 29, 2024

☑️ Resolves

🧪 Testing locally

  • General note: Cron jobs might be used, so if you wait for a response, make sure to run php cron.php couple of times locally.

Option 1: Testing app

  • Enable the QA testing app (part of server repo): index.php/settings/apps/installed
  • On Task: Summarize select Fake text2text summary task processing provider: index.php/settings/admin/ai
  • Will always return a response starting with This is a fake summary and is also used by CI tests for the backend

Option 2: Integration OpenAI

  • 👀 Be aware of the privacy leak in case your test data contains private information
  • Enable the OpenAI and LocalAI integration app (clone from https://github.com/nextcloud/integration_openai): index.php/settings/apps/installed
  • Go to https://console.groq.com/login and create a new account (I recommend to use email rather then GitHub)
  • After sign-up go to https://console.groq.com/keys and "Create API key"
  • Set OpenAI and LocalAI integration settings on index.php/settings/admin/ai#openai_prefs
    • Service URL: https://api.groq.com/openai/v1
    • Service Name: groq.com
    • Authentication method: API Key
    • API Key: Insert value from previous step
  • On Task: Summarize select groq.com: index.php/settings/admin/ai

🛠️ API Checklist

🚧 Tasks

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

@nickvergessen nickvergessen added 2. developing enhancement feature: chat 💬 Chat and system messages feature: api 🛠️ OCS API for conversations, chats and participants labels Oct 29, 2024
@nickvergessen nickvergessen added this to the 🖤 Next Major (31) milestone Oct 29, 2024
@nickvergessen nickvergessen self-assigned this Oct 29, 2024
@nickvergessen nickvergessen marked this pull request as draft October 29, 2024 14:20
@nickvergessen nickvergessen force-pushed the feat/13430/unread-messages-summary branch from e50089e to 165b210 Compare November 8, 2024 14:36
@nickvergessen nickvergessen force-pushed the feat/13430/unread-messages-summary branch 2 times, most recently from 817a419 to f115e17 Compare November 11, 2024 11:36
@nickvergessen nickvergessen marked this pull request as ready for review November 11, 2024 11:36
@nickvergessen nickvergessen force-pushed the feat/13430/unread-messages-summary branch from f115e17 to 9c60223 Compare November 11, 2024 11:38
@nickvergessen nickvergessen force-pushed the feat/13430/unread-messages-summary branch from 9c60223 to 5c5a336 Compare November 11, 2024 13:35
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

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

groq scheduled tasks are failing. but also tokk some time to wait, before they're staying in 'scheduled status'. Need to discuss how to handle these cases in UI.

But tested with Fake Processor, seems to work fine.

lib/Controller/ChatController.php Show resolved Hide resolved
docs/capabilities.md Outdated Show resolved Hide resolved
lib/Controller/ChatController.php Outdated Show resolved Hide resolved
tests/integration/features/chat-4/summary.feature Outdated Show resolved Hide resolved
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the feat/13430/unread-messages-summary branch from f67624f to b9f206c Compare November 14, 2024 14:38
@nickvergessen
Copy link
Member Author

/backport to stable30

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the feat/13430/unread-messages-summary branch from 28c669c to fb841e8 Compare November 14, 2024 15:08
@nickvergessen nickvergessen merged commit 9ce1588 into main Nov 14, 2024
70 checks passed
@nickvergessen nickvergessen deleted the feat/13430/unread-messages-summary branch November 14, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review enhancement feature: api 🛠️ OCS API for conversations, chats and participants feature: chat 💬 Chat and system messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants