You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs
Eugene Zapolsky 6b9e3ed9e9
google-vertexai[minor]: added safety_settings property to gemini wrapper (#15344)
**Description:** Gemini model has quite annoying default safety_settings
settings. In addition, current VertexAI class doesn't provide a property
to override such settings.
So, this PR aims to 
 - add safety_settings property to VertexAI
- fix issue with incorrect LLM output parsing when LLM responds with
appropriate 'blocked' response
- fix issue with incorrect parsing LLM output when Gemini API blocks
prompt itself as inappropriate
- add safety_settings related tests

I'm not enough familiar with langchain code base and guidelines. So, any
comments and/or suggestions are very welcome.
 
**Issue:** it will likely fix #14841

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
6 months ago
..
cli Make packages optional (#15727) 6 months ago
community infra: Use dotenv in langchain-community's integration tests (#16137) 6 months ago
core core[patch]: testing add chat model for unit-tests (#16209) 6 months ago
experimental core[patch]: simple prompt pretty printing (#15968) 6 months ago
langchain Add revision identifier to run_on_dataset (#16167) 6 months ago
partners google-vertexai[minor]: added safety_settings property to gemini wrapper (#15344) 6 months ago