This PR introduces system instruction support and adds the ability to easily configure the client to use the beta API endpoint (required for system instructions).
Changes
System Instruction Support:
Added withSystemInstruction method to the GenerativeModel class
Updated GenerateContentRequest and related components to include system instructions in API requests
Modified Client and GenerativeModelContract to support system instructions
Added tests to verify system instruction functionality
Added tests to cover the new beta API configuration
Additional Notes:
The code follows the project's coding style (verified using composer lint)
Tests have been added for the new functionality
The commit history is coherent and meaningful
No breaking changes have been introduced, maintaining SemVer compatibility
Tested in my own project, and everything is working properly
Please review and let me know if any further changes are needed.
This is almost 1:1 copy of @gregpriday PR:https://github.com/google-gemini-php/client/pull/42, but added on beta branch instead of main.
This PR introduces system instruction support and adds the ability to easily configure the client to use the beta API endpoint (required for system instructions).
Changes
System Instruction Support:
Added tests to cover the new beta API configuration
Additional Notes: