Closed gregpriday closed 1 month ago
I see this will actually need a few fixes and changes, but I'll wait to see if you want to add support for this first.
Hello @gregpriday , First of all, thank you for your contribution.
I think it is not right to have beta and stable versions on the same branch.
Because most things change, such as parameters, returned answers, etc. Stable channel users will try and get errors when they see the beta features. Or it can be the other way around. For this, I created a new beta branch last week.
Those who want to use the beta features can add this branch as a dependency to their project.
https://packagist.org/packages/google-gemini-php/client#1.0.1-beta https://github.com/google-gemini-php/client/tree/beta
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:
withSystemInstruction
method to theGenerativeModel
classGenerateContentRequest
and related components to include system instructions in API requestsClient
andGenerativeModelContract
to support system instructionsBeta API Support:
useBetaApi()
method in theFactory
class to easily set the base URL to the beta API endpointUsage Example
composer lint
)Please review and let me know if any further changes are needed.