sk1502 commited on
Commit
3d0c18b
·
1 Parent(s): b6e2b4a

Added env variables

Browse files
Files changed (1) hide show
  1. aisearch_v1.py +7 -14
aisearch_v1.py CHANGED
@@ -19,20 +19,14 @@ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
19
 
20
  load_dotenv()
21
  # GROQ_APIKEY = os.environ.get('GROQ_APIKEY')
22
- GOOGS_APIKEY = "AIzaSyDwkt2Ha0Y2eWOH0XonhJvEg5gXUfedRf4"
23
- SEARCH_ENGINE_ID = "f722438bf451a41a1"
24
- # GEMINI_APIKEY = os.environ.get('GEMINI_APIKEY')
25
 
26
  az_client = AsyncAzureOpenAI(
27
- api_key='55b49aec1d734ba2a7e912bdef22af7a',
28
  api_version="2024-12-01-preview", # Use the appropriate API version
29
- azure_endpoint='https://docuswiftchat-aillm-zgpfobsurevrg.openai.azure.com/'
30
- )
31
-
32
- az_client_in = AsyncAzureOpenAI(
33
- api_key='CvRegNn4vwFkcAs8LPkjqeAb0qdHO88AvVxsSrnshauwP9jDm9DsJQQJ99BCAC77bzfXJ3w3AAAAACOGdbvR',
34
- api_version="2024-12-01-preview", # Use the appropriate API version
35
- azure_endpoint='https://docus-ai-ind954042238035.openai.azure.com'
36
  )
37
 
38
  class ReportResponse(BaseModel):
@@ -45,8 +39,7 @@ class ReportResponse(BaseModel):
45
 
46
 
47
  # client = genai.Client(api_key=GEMINI_APIKEY)
48
- gemini_client = genai.Client(api_key='AIzaSyBOtSrEcYlGuTZ-XZT5zJo3T_oPAWn3T2Y')
49
- # gemini_client1 = genai.Client(api_key='AIzaSyBOtSrEcYlGuTZ-XZT5zJo3T_oPAWn3T2Y')
50
 
51
  class aiSearch:
52
  def __init__(self):
@@ -130,7 +123,7 @@ class aiSearch:
130
  </output format>"""
131
 
132
  async def gpt4omini(self,query):
133
- chat_completion = await az_client_in.chat.completions.create(
134
  messages=[
135
  {
136
  "role" : "system",
 
19
 
20
  load_dotenv()
21
  # GROQ_APIKEY = os.environ.get('GROQ_APIKEY')
22
+ GOOGS_APIKEY = os.environ.get('GOOGS_APIKEY')
23
+ SEARCH_ENGINE_ID = os.environ.get('SEARCH_ENGINE_ID')
24
+ GEMINI_APIKEY = os.environ.get('GEMINI_APIKEY')
25
 
26
  az_client = AsyncAzureOpenAI(
27
+ api_key=os.environ.get('AZURE_OPENAI_API_KEY'),
28
  api_version="2024-12-01-preview", # Use the appropriate API version
29
+ azure_endpoint=os.environ.get('AZURE_OPENAI_ENDPOINT')
 
 
 
 
 
 
30
  )
31
 
32
  class ReportResponse(BaseModel):
 
39
 
40
 
41
  # client = genai.Client(api_key=GEMINI_APIKEY)
42
+ gemini_client = genai.Client(api_key=GEMINI_APIKEY)
 
43
 
44
  class aiSearch:
45
  def __init__(self):
 
123
  </output format>"""
124
 
125
  async def gpt4omini(self,query):
126
+ chat_completion = await az_client.chat.completions.create(
127
  messages=[
128
  {
129
  "role" : "system",