Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@ from composio_llamaindex import ComposioToolSet, App, Action
|
|
| 5 |
from llama_index.core.agent import FunctionCallingAgentWorker
|
| 6 |
from llama_index.core.llms import ChatMessage
|
| 7 |
from llama_index.llms.openai import OpenAI
|
|
|
|
| 8 |
from dotenv import load_dotenv
|
| 9 |
import gradio as gr
|
| 10 |
import os
|
|
@@ -36,7 +37,7 @@ class APIResponse:
|
|
| 36 |
class CalendarService:
|
| 37 |
def __init__(self):
|
| 38 |
self.toolset = ComposioToolSet(api_key=os.getenv('COMPOSIO_API_KEY'))
|
| 39 |
-
self.llm =
|
| 40 |
self.connections: Dict[str, Dict[str, Any]] = {}
|
| 41 |
|
| 42 |
def initiate_connection(self, entity_id: str, redirect_url: Optional[str] = None) -> APIResponse:
|
|
|
|
| 5 |
from llama_index.core.agent import FunctionCallingAgentWorker
|
| 6 |
from llama_index.core.llms import ChatMessage
|
| 7 |
from llama_index.llms.openai import OpenAI
|
| 8 |
+
from llama_index.llms.gemini import Gemini
|
| 9 |
from dotenv import load_dotenv
|
| 10 |
import gradio as gr
|
| 11 |
import os
|
|
|
|
| 37 |
class CalendarService:
|
| 38 |
def __init__(self):
|
| 39 |
self.toolset = ComposioToolSet(api_key=os.getenv('COMPOSIO_API_KEY'))
|
| 40 |
+
self.llm = Gemini(model="models/gemini-2.0-flash", api_key=os.getenv('GOOGLE_API_KEY'))
|
| 41 |
self.connections: Dict[str, Dict[str, Any]] = {}
|
| 42 |
|
| 43 |
def initiate_connection(self, entity_id: str, redirect_url: Optional[str] = None) -> APIResponse:
|