Skip to content

Conversation

@CarlosNahuelcoy
Copy link
Contributor

🎯 Overview

This PR adds Player2 AI as a new provider option, giving users an alternative AI service specifically designed for character dialogue and conversations.

✨ Features Added

  • Player2 Client: Full integration with Player2 API including streaming support
  • Health Monitoring: Automatic health checks every 60 seconds as required by Player2 API
  • UI Integration: Player2 appears alongside existing providers (Google, OpenAI, etc.)
  • Authentication: Proper Bearer token authentication with embedded game client ID
  • Error Handling: Specific error messages and quota handling for Player2

🔧 Technical Details

New Files:

  • Client/Player2/Player2Client.cs - Main API client with streaming support
  • Client/Player2/Player2Models.cs - Request/response data models
  • Client/Player2/Player2StreamHandler.cs - Server-sent events handler

Modified Files:

  • Settings.cs - Added Player2 to provider dropdown and model selection
  • AIClientFactory.cs - Added Player2 client instantiation
  • AIProvider enum - Added Player2 option

🎮 User Experience

  1. Users select "Player2" from provider dropdown in advanced settings
  2. Enter their Player2 API key
  3. Model automatically set to "Default" (Player2 uses fixed model)
  4. Health checks run automatically in background when active

🔒 API Compliance

  • Uses game client ID: 019a8368-b00b-72bc-b367-2825079dc6fb
  • Calls /health endpoint every 60 seconds when Player2 is active
  • Proper authentication headers and comprehensive error handling
  • Follows Player2 API specifications exactly

✅ Testing

  • Compiles without errors or warnings
  • Player2 appears in settings UI correctly
  • Backward compatibility maintained with existing providers
  • No breaking changes to existing functionality
  • Health check system functions properly

🔗 User Resources

For users who want to use Player2, I've created a simple web tool to generate API keys:
https://gerikuylerk.com/RimTalk/

This tool handles the Player2 OAuth flow and provides users with their API key in a copy-paste format, making it easier to configure the mod. Feel free to include this link in the mod description or documentation if you find it useful.

📚 Benefits for Users

  • Better Conversations: Player2 specializes in character dialogue and personality consistency
  • More Options: Alternative to Google/OpenAI if users prefer or have quota issues
  • Easy Setup: Simple API key configuration with helper website
  • Reliable: Built-in health monitoring and proper error handling
  • No Breaking Changes: Existing users unaffected, purely additive feature

🙏 Credits

All credit goes to you for creating this amazing mod! This is simply a community contribution to provide users with additional AI provider options.

Sorry, something went wrong.

@jlibrary jlibrary merged commit 1190137 into jlibrary:main Nov 19, 2025
benny30912 pushed a commit to benny30912/RimTalk that referenced this pull request Dec 20, 2025

Unverified

The signature in this commit could not be verified. Someone may be trying to trick you.
…ntegration

Thanks for the contribution - merging it.
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.

None yet

2 participants