vachaspathi commited on
Commit
b5dd5ac
·
verified ·
1 Parent(s): 638ecb1

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +28 -10
config.py CHANGED
@@ -1,19 +1,37 @@
1
- # config.py
 
 
2
  # =====================================================
3
- # CONFIGURATION CENTER
4
  # =====================================================
5
 
6
- # ZOHO CREDENTIALS
 
 
7
  CLIENT_ID = "1000.SIMKGAO5719K0TQ0QZQ31ZU57RLFNQ"
8
  CLIENT_SECRET = "60b329b4fe51930abee900cba6524ec7332cd67e06"
9
  REFRESH_TOKEN = "1000.fcbd3eb6544c48591ceb462eefe439e1.e6dacb8875fec5fa150596fa44eb9326"
10
  ORGANIZATION_ID = "60058860935"
11
 
12
- # API ENDPOINTS
13
- AUTH_URL = "https://accounts.zoho.in/oauth/v2/token"
14
- # API_BASE = "https://www.zohoapis.in/books/v3"
15
- API_BASE = "https://www.zohoapis.com/crm/v2"
 
 
 
 
 
 
 
 
 
16
 
17
- # AI SETTINGS (UPGRADED)
18
- # 1.5B is the sweet spot for Free CPU (Smart enough for JSON, fast enough to run)
19
- MODEL_ID = "Qwen/Qwen2.5-1.5B-Instruct"
 
 
 
 
 
 
1
+ mport os
2
+ import google.generativeai as genai
3
+
4
  # =====================================================
5
+ # CONFIGURATION CENTER
6
  # =====================================================
7
 
8
+ # --- 1. ZOHO CREDENTIALS (Reused from existing setup) ---
9
+ # These credentials are used for the OAuth 2.0 flow to obtain an access token.
10
+ # A tool (e.g., authenticate_zoho) will use these to ensure a valid token is available [7, 8].
11
  CLIENT_ID = "1000.SIMKGAO5719K0TQ0QZQ31ZU57RLFNQ"
12
  CLIENT_SECRET = "60b329b4fe51930abee900cba6524ec7332cd67e06"
13
  REFRESH_TOKEN = "1000.fcbd3eb6544c48591ceb462eefe439e1.e6dacb8875fec5fa150596fa44eb9326"
14
  ORGANIZATION_ID = "60058860935"
15
 
16
+ # --- 2. API ENDPOINTS (Updated for CRM) ---
17
+ AUTH_URL = "https://accounts.zoho.in/oauth/v2/token"
18
+
19
+ # CHANGE: Targeting Zoho CRM (not Books). Tools must POST to /crm/v2/{Module} [3, 6, 7].
20
+ API_BASE = "https://www.zohoapis.in/crm/v2"
21
+ # CRM operations (like create_contact) will use this new base URL [6].
22
+
23
+ # --- 3. AI SETTINGS (New Gemini Integration) ---
24
+ # REMOVE: MODEL_ID = "Qwen/Qwen2.5-1.5B-Instruct"
25
+ # ADD: Gemini API Key as the agent will be driven by Gemini [2, 5, 9].
26
+ # The key 'AlzaSyB6Bw5Hr-FbiLK2hMm6cnSH193ZBpXTCE8' is derived from your provided API key details [10, 11].
27
+ GEMINI_API_KEY = "AlzaSyB6Bw5Hr-FbiLK2hMm6cnSH193ZBpXTCE8"
28
+ os.environ['GOOGLE_API_KEY'] = GEMINI_API_KEY
29
 
30
+ def configure_gemini():
31
+ """Initializes the Gemini client using the API key."""
32
+ # We use the google-generativeai library to call Gemini via API key [4, 12].
33
+ try:
34
+ genai.configure(api_key=os.environ['GOOGLE_API_KEY'])
35
+ print("Gemini API configured successfully.")
36
+ except Exception as e:
37
+ print(f"Error configuring Gemini API: {e}")