wellvolks commited on
Commit
80b22a3
·
1 Parent(s): 3097e92

Alteração no MLSalesPitch para considerar a ENV OPENAI_API_KEY

Browse files
MLSalesPitch.py CHANGED
@@ -28,15 +28,17 @@ class MLSalesPitch:
28
  self.retriever_about = None
29
 
30
  self.TOKEN_ML = None#os.environ['TOKEN_ML']
31
- self.OPENAI_API_KEY = os.environ['OPENAI_KEY']
32
 
33
- self.client = OpenAI()
 
 
 
34
  self.nlp = None#spacy.load("pt_core_news_sm")
35
 
36
- OpenAI.api_key = self.OPENAI_API_KEY
37
 
38
  self.output_parser = StrOutputParser()
39
- self.model = ChatOpenAI(openai_api_key=self.OPENAI_API_KEY, model="gpt-3.5-turbo")
40
 
41
  template = """Com base nas seguintes informações de produtos fornecidas abaixo:
42
 
 
28
  self.retriever_about = None
29
 
30
  self.TOKEN_ML = None#os.environ['TOKEN_ML']
 
31
 
32
+ os.environ['OPENAI_API_KEY'] = os.environ['OPENAI_KEY']
33
+
34
+ self.client = OpenAI(api_key=os.environ['OPENAI_KEY'])
35
+
36
  self.nlp = None#spacy.load("pt_core_news_sm")
37
 
38
+ OpenAI.api_key = os.environ['OPENAI_KEY']
39
 
40
  self.output_parser = StrOutputParser()
41
+ self.model = ChatOpenAI(openai_api_key=os.environ['OPENAI_KEY'], model="gpt-3.5-turbo")
42
 
43
  template = """Com base nas seguintes informações de produtos fornecidas abaixo:
44
 
asserts/imgs/t/CopywritingLLMs.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
asserts/imgs/t/MLSalesPitch.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1db9df1a22317c604446ddf83bb536e1216f638ba87d891e6e21cc0a35c5d519
3
+ size 58469
asserts/imgs/t/link-para-do-huggingface.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ https://huggingface.co/spaces/wellvolks/MLSalesPitch