JJteam commited on
Commit
32c26b5
1 Parent(s): acc4ffe

updating environment variable

Browse files
AllInOneApp/Chat-GPT-LangChain/app.py CHANGED
@@ -23,8 +23,8 @@ from langchain.utilities import ImunAPIWrapper, ImunMultiAPIWrapper
23
  from openai.error import AuthenticationError, InvalidRequestError, RateLimitError
24
  import argparse
25
 
26
- # header_key = os.environ["CVFIAHMED_KEY"]
27
- OPENAI_API_KEY = os.environ["OPENAI_API_KEY"]
28
  TOOLS_LIST = ['pal-math', 'imun'] #'google-search','news-api','tmdb-api','open-meteo-api'
29
  TOOLS_DEFAULT_LIST = ['pal-math', 'imun']
30
  BUG_FOUND_MSG = "Congratulations, you've found a bug in this application!"
@@ -109,7 +109,7 @@ def load_chain(history):
109
  imun_dense = ImunAPIWrapper(
110
  imun_url="https://ehazarwestus.cognitiveservices.azure.com/computervision/imageanalysis:analyze",
111
  params="api-version=2023-02-01-preview&model-version=latest&features=denseCaptions",
112
- imun_subscription_key=os.environ["IMUN_SUBSCRIPTION_KEY2"])
113
 
114
  imun = ImunAPIWrapper()
115
  imun = ImunMultiAPIWrapper(imuns=[imun, imun_dense])
@@ -121,22 +121,22 @@ def load_chain(history):
121
  imun_read = ImunAPIWrapper(
122
  imun_url="https://vigehazar.cognitiveservices.azure.com/formrecognizer/documentModels/prebuilt-read:analyze",
123
  params="api-version=2022-08-31",
124
- imun_subscription_key=os.environ["IMUN_OCR_SUBSCRIPTION_KEY"])
125
 
126
  imun_receipt = ImunAPIWrapper(
127
  imun_url="https://vigehazar.cognitiveservices.azure.com/formrecognizer/documentModels/prebuilt-receipt:analyze",
128
  params="api-version=2022-08-31",
129
- imun_subscription_key=os.environ["IMUN_OCR_SUBSCRIPTION_KEY"])
130
 
131
  imun_businesscard = ImunAPIWrapper(
132
  imun_url="https://vigehazar.cognitiveservices.azure.com/formrecognizer/documentModels/prebuilt-businessCard:analyze",
133
  params="api-version=2022-08-31",
134
- imun_subscription_key=os.environ["IMUN_OCR_SUBSCRIPTION_KEY"])
135
 
136
  imun_layout = ImunAPIWrapper(
137
  imun_url="https://vigehazar.cognitiveservices.azure.com/formrecognizer/documentModels/prebuilt-layout:analyze",
138
  params="api-version=2022-08-31",
139
- imun_subscription_key=os.environ["IMUN_OCR_SUBSCRIPTION_KEY"])
140
 
141
  bing = BingSearchAPIWrapper(k=2)
142
 
 
23
  from openai.error import AuthenticationError, InvalidRequestError, RateLimitError
24
  import argparse
25
 
26
+ # header_key = os.environ.get("CVFIAHMED_KEY")
27
+ OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
28
  TOOLS_LIST = ['pal-math', 'imun'] #'google-search','news-api','tmdb-api','open-meteo-api'
29
  TOOLS_DEFAULT_LIST = ['pal-math', 'imun']
30
  BUG_FOUND_MSG = "Congratulations, you've found a bug in this application!"
 
109
  imun_dense = ImunAPIWrapper(
110
  imun_url="https://ehazarwestus.cognitiveservices.azure.com/computervision/imageanalysis:analyze",
111
  params="api-version=2023-02-01-preview&model-version=latest&features=denseCaptions",
112
+ imun_subscription_key=os.environ.get("IMUN_SUBSCRIPTION_KEY2"))
113
 
114
  imun = ImunAPIWrapper()
115
  imun = ImunMultiAPIWrapper(imuns=[imun, imun_dense])
 
121
  imun_read = ImunAPIWrapper(
122
  imun_url="https://vigehazar.cognitiveservices.azure.com/formrecognizer/documentModels/prebuilt-read:analyze",
123
  params="api-version=2022-08-31",
124
+ imun_subscription_key=os.environ.get("IMUN_OCR_SUBSCRIPTION_KEY"))
125
 
126
  imun_receipt = ImunAPIWrapper(
127
  imun_url="https://vigehazar.cognitiveservices.azure.com/formrecognizer/documentModels/prebuilt-receipt:analyze",
128
  params="api-version=2022-08-31",
129
+ imun_subscription_key=os.environ.get("IMUN_OCR_SUBSCRIPTION_KEY"))
130
 
131
  imun_businesscard = ImunAPIWrapper(
132
  imun_url="https://vigehazar.cognitiveservices.azure.com/formrecognizer/documentModels/prebuilt-businessCard:analyze",
133
  params="api-version=2022-08-31",
134
+ imun_subscription_key=os.environ.get("IMUN_OCR_SUBSCRIPTION_KEY"))
135
 
136
  imun_layout = ImunAPIWrapper(
137
  imun_url="https://vigehazar.cognitiveservices.azure.com/formrecognizer/documentModels/prebuilt-layout:analyze",
138
  params="api-version=2022-08-31",
139
+ imun_subscription_key=os.environ.get("IMUN_OCR_SUBSCRIPTION_KEY"))
140
 
141
  bing = BingSearchAPIWrapper(k=2)
142