Skip to content

Feature/ai abilities api#1204

Draft
jmarx wants to merge 99 commits intoGatherPress:developfrom
jmarx:feature/ai-abilities-api
Draft

Feature/ai abilities api#1204
jmarx wants to merge 99 commits intoGatherPress:developfrom
jmarx:feature/ai-abilities-api

Conversation

@jmarx
Copy link
Copy Markdown
Collaborator

@jmarx jmarx commented Oct 31, 2025

Description of the Change

Closes #

How to test the Change

Changelog Entry

Added - New feature
Changed - Existing functionality
Deprecated - Soon-to-be removed feature
Removed - Feature
Fixed - Bug fix
Security - Vulnerability

Credits

Props @username, @username2, ...

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@what-the-diff
Copy link
Copy Markdown

what-the-diff Bot commented Oct 31, 2025

PR Summary

  • Incorporation of Abilities Integration Instance
    With this change, we've added a function call within our class setup process that initiates the instance of Abilities Integration. This addition should improve our ability to integrate different class functionalities in a smoother and more efficient way.

@mauteri
Copy link
Copy Markdown
Contributor

mauteri commented Oct 31, 2025

@jmarx quick notes:

  1. Let's put the classes in a subdirectory called ai
  2. Move your settings to the GatherPress Settings under a new tab called AI. Add a dropdown for service (OpenAI) for now and a field for API key.

This looks great! Thx!

jmarx added 29 commits January 2, 2026 12:18
- Fix empty catch block by adding code (set provider_name to empty string)
- Fix line length issues by shortening translation strings
- Add @throws tag to process_conversation_loop method
- Fix inline comment punctuation
- All errors and warnings resolved (0 errors, 0 warnings)
- Break long translation string across multiple lines
- All linting issues resolved for class-setup.php
…, init_wp_ai_client, increase_ai_request_timeout)
- Backend: Accumulate token usage across conversation loop iterations
- Backend: Calculate estimated cost using GPT-4 Turbo pricing (input: --.01/1K, output: --.03/1K)
- Frontend: Display token counts and estimated cost in chat messages
- Tests: Add JS tests for token usage display
- Tests: Add PHP tests for token usage calculation structure

This feature helps track API costs during AI conversations.
@github-actions
Copy link
Copy Markdown
Contributor

Preview changes with Playground

You can preview the recent changes for PR#1204 with the following PHP versions:

PHP Version 8.4

PHP Version 8.2

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

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