zhaokeyao1
commited on
Commit
·
d22e8cd
1
Parent(s):
1d80acf
Update key
Browse files
app.py
CHANGED
|
@@ -15,14 +15,14 @@ class ChatgptAPI:
|
|
| 15 |
)
|
| 16 |
'''
|
| 17 |
self.client=OpenAI(
|
| 18 |
-
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 |
{
|