zhaokeyao1 commited on
Commit
d22e8cd
·
1 Parent(s): 1d80acf

Update key

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,14 +15,14 @@ class ChatgptAPI:
15
  )
16
  '''
17
  self.client=OpenAI(
18
- api_key="sk-99f10c5ab8da406b90dd389e04218d09", # �滻����ʵDashScope��API_KEY
19
  base_url="https://dashscope.aliyuncs.com/compatible-mode/v1", # ��дDashScopebase_url
20
  )
21
 
22
 
23
  def get_summary(self, file_path):
24
  file = self.client.files.create(file=Path(file_path), purpose="file-extract")
25
- completion = client.chat.completions.create(
26
  model="qwen-long",
27
  messages=[
28
  {
 
15
  )
16
  '''
17
  self.client=OpenAI(
18
+ api_key=os.environ.get("TONGYI_API_KEY"), # �滻����ʵDashScope��API_KEY
19
  base_url="https://dashscope.aliyuncs.com/compatible-mode/v1", # ��дDashScopebase_url
20
  )
21
 
22
 
23
  def get_summary(self, file_path):
24
  file = self.client.files.create(file=Path(file_path), purpose="file-extract")
25
+ completion = self.client.chat.completions.create(
26
  model="qwen-long",
27
  messages=[
28
  {