Arcypojeb commited on
Commit
f71e6e6
1 Parent(s): 5e381a5

Update AgentGPT.py

Browse files
Files changed (1) hide show
  1. AgentGPT.py +9 -4
AgentGPT.py CHANGED
@@ -14,6 +14,11 @@ from langchain.llms import HuggingFaceHub
14
  from langchain.llms.fireworks import Fireworks
15
  from langchain.chat_models.fireworks import ChatFireworks
16
 
 
 
 
 
 
17
  client_ports = []
18
 
19
  # Define the websocket client class
@@ -24,10 +29,10 @@ class AgentsGPT:
24
 
25
  async def get_response(self, question):
26
 
27
- GOOGLE_CSE_ID = os.environ["GOOGLE_CSE_ID"]
28
- GOOGLE_API_KEY = os.environ["GOOGLE_API_KEY"]
29
- FIREWORKS_API_KEY = os.environ["FIREWORKS_API_KEY"]
30
- HUGGINGFACEHUB_API_TOKEN = os.environ["HUGGINGFACEHUB_API_TOKEN"]
31
 
32
  llm = Fireworks(model="accounts/fireworks/models/llama-v2-70b-chat", model_kwargs={"temperature":0, "max_tokens":1500, "top_p":1.0}, streaming=True)
33
  tools = load_tools(["google-search", "llm-math"], llm=llm)
 
14
  from langchain.llms.fireworks import Fireworks
15
  from langchain.chat_models.fireworks import ChatFireworks
16
 
17
+ GOOGLE_CSE_ID = os.getenv("GOOGLE_CSE_ID")
18
+ GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
19
+ FIREWORKS_API_KEY = os.getenv("FIREWORKS_API_KEY")
20
+ HUGGINGFACEHUB_API_TOKEN = os.getenv("HUGGINGFACEHUB_API_TOKEN")
21
+
22
  client_ports = []
23
 
24
  # Define the websocket client class
 
29
 
30
  async def get_response(self, question):
31
 
32
+ os.environ["GOOGLE_CSE_ID"] = GOOGLE_CSE_ID
33
+ os.environ["GOOGLE_API_KEY"] = GOOGLE_API_KEY
34
+ os.environ["FIREWORKS_API_KEY"] = FIREWORKS_API_KEY
35
+ os.environ["HUGGINGFACEHUB_API_TOKEN"] = HUGGINGFACEHUB_API_TOKEN
36
 
37
  llm = Fireworks(model="accounts/fireworks/models/llama-v2-70b-chat", model_kwargs={"temperature":0, "max_tokens":1500, "top_p":1.0}, streaming=True)
38
  tools = load_tools(["google-search", "llm-math"], llm=llm)