Support Google's Gemini model series (#902)

* Add functions to chat with Google's gemini model series
  * Gracefully close thread when there's an exception in the gemini llm thread
* Use enums for verifying the chat model option type
* Add a migration to add the gemini chat model type to the db model
* Fix chat model selection verification and math prompt tuning
* Fix extract questions method with gemini. Enforce json response in extract questions.
* Add standard stop sequence for Gemini chat response generation

---------

Co-authored-by: sabaimran <narmiabas@gmail.com>
Co-authored-by: Debanjum Singh Solanky <debanjum@gmail.com>
This commit is contained in:
Alexander Matyasko
2024-09-13 09:17:55 +08:00
committed by GitHub
parent 42b727e926
commit 9570933506
11 changed files with 438 additions and 16 deletions

View File

@@ -87,7 +87,8 @@ dependencies = [
"cron-descriptor == 1.4.3",
"django_apscheduler == 0.6.2",
"anthropic == 0.26.1",
"docx2txt == 0.8"
"docx2txt == 0.8",
"google-generativeai == 0.7.2"
]
dynamic = ["version"]