samim2024 commited on
Commit
91f248b
·
verified ·
1 Parent(s): 70156fe

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +4 -2
utils.py CHANGED
@@ -4,19 +4,21 @@ from langchain.agents import initialize_agent
4
  from langchain.agents.agent_toolkits import ZapierToolkit
5
  from langchain.utilities.zapier import ZapierNLAWrapper
6
  import os
 
 
7
 
8
  # get from https://platform.openai.com/
9
  os.environ["OPENAI_API_KEY"] = "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"
10
 
11
  # get from https://nla.zapier.com/docs/authentication/ & https://actions.zapier.com/credentials/ after logging in):
12
- os.environ["ZAPIER_NLA_API_KEY"] = "sk-ak-iPp3rBjaP9PpjRDpDhIXtsXsCj"
13
 
14
 
15
  def email_summary(file):
16
 
17
 
18
  # large language model
19
- llm = OpenAI(temperature=0)
20
 
21
  # Initializing zapier
22
  zapier = ZapierNLAWrapper()
 
4
  from langchain.agents.agent_toolkits import ZapierToolkit
5
  from langchain.utilities.zapier import ZapierNLAWrapper
6
  import os
7
+ from langchain.llms import HuggingFaceEndpoint
8
+ from langchain.llms import huggingface_hub
9
 
10
  # get from https://platform.openai.com/
11
  os.environ["OPENAI_API_KEY"] = "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"
12
 
13
  # get from https://nla.zapier.com/docs/authentication/ & https://actions.zapier.com/credentials/ after logging in):
14
+ os.environ["ZAPIER_NLA_API_KEY"] = "sk-ak-7ZkOoOYS9zB0cwl5rARDBWzBYF"
15
 
16
 
17
  def email_summary(file):
18
 
19
 
20
  # large language model
21
+ llm = HuggingFaceEndpoint(repo_id="mistralai/Mistral-7B-Instruct-v0.2", temperature=0.9)
22
 
23
  # Initializing zapier
24
  zapier = ZapierNLAWrapper()