File tree Expand file tree Collapse file tree 14 files changed +38
-35
lines changed
Expand file tree Collapse file tree 14 files changed +38
-35
lines changed File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 11[tool .poetry ]
2- name = " gemini_generate "
2+ name = " gemini "
33version = " 0.0.1"
4- description = " A simple example to generate content using Google Gemini"
4+ description = " A simple example to integrate Google Gemini into a Restack project "
55authors = [
66 " Restack Team <[email protected] >" ,
77]
@@ -11,7 +11,7 @@ packages = [{include = "src"}]
1111[tool .poetry .dependencies ]
1212python = " >=3.10,<4.0"
1313restack-ai = " ^0.0.52"
14- google-generativeai = " 0.8.3 "
14+ google-genai = " 0.5.0 "
1515watchfiles = " ^1.0.0"
1616
1717[build-system ]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -9,15 +9,15 @@ class FunctionInputParams:
99 user_content : str
1010
1111@function .defn ()
12- async def gemini_generate_opposite (input : FunctionInputParams ) -> str :
12+ async def gemini_generate_content (input : FunctionInputParams ) -> str :
1313 try :
14- log .info ("gemini_generate_opposite function started" , input = input )
14+ log .info ("gemini_generate_content function started" , input = input )
1515 genai .configure (api_key = os .environ .get ("GEMINI_API_KEY" ))
16- model = genai .GenerativeModel ("gemini-1.5 -flash" )
16+ model = genai .GenerativeModel ("gemini-2.0 -flash-exp " )
1717
1818 response = model .generate_content (input .user_content )
19- log .info ("gemini_generate_opposite function completed" , response = response .text )
19+ log .info ("gemini_generate_content function completed" , response = response .text )
2020 return response .text
2121 except Exception as e :
22- log .error ("gemini_generate_opposite function failed" , error = e )
22+ log .error ("gemini_generate_content function failed" , error = e )
2323 raise e
You can’t perform that action at this time.
0 commit comments