Does Gemini API support Model Context Prompting?

Hello,

I’m currently developing {gemini.R} , an R package providing functions to interface with the Gemini API. I’d like to clarify whether Gemini API supports a “Model Context Prompt” functionality, similar to persistent context prompts available in other LLM APIs.

I’m not certain if this feature is required, but several users have inquired about my plans to implement such functionality. During preliminary tests, attempts to utilize context prompts resulted in a 400 error.

Could you confirm if Gemini API currently supports this or any similar feature?

Thanks!

1 Like

Hi @jhk0530 ,

Welcome to the forum !!
Yes, the Gemini API fully supports model context prompting, including advanced features such as long-context processing and various prompting strategies.
For more detailed information, please refer to the official documentation provided by Google at the following link:
:link: Gemini API - Prompting Strategies and Long Context Support

Thank you.