google-gemini-php / client

⚡️ Gemini PHP is a community-maintained PHP API client that allows you to interact with the Gemini AI API.
MIT License
183 stars 30 forks source link

A new parameter ‘system_instruction’ should be added #12

Closed theeosdev closed 5 months ago

theeosdev commented 5 months ago

SYSTEM_INSTRUCTION: (Optional) Available for gemini-1.0-pro-002 and gemini-1.5-pro-preview-0409. Instructions for the model to steer it toward better performance. For example, "Answer as concisely as possible" or "Print the results in JSON format".

https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/send-chat-prompts-gemini#gemini-chat-samples-drest

aydinfatih commented 5 months ago

Hi @theeosdev First of all, thank you for your feedback. The documentation that the package is based on is as follows. This feature is not yet specified in the gemini documentation.

https://ai.google.dev/api/rest/v1/models/generateContent

swichers commented 4 months ago

@aydinfatih

https://ai.google.dev/api/rest/v1beta/models/generateContent#request-body

https://ai.google.dev/gemini-api/docs/system-instructions

aydinfatih commented 4 months ago

@swichers Yes, I saw that, but this feature is currently in beta. I will include it in the package when it is out of beta.

frankiejarrett commented 2 months ago

@aydinfatih rather than requiring developers to fork your repo just to try a beta feature could you remove final from class GenerationConfig and allow us to easily extend it? Or is there another way I'm not seeing? Thanks.

erenkulaksiz commented 1 month ago

Hello, any updates on this? @aydinfatih