zhaokeyao1
commited on
Commit
·
3de0064
1
Parent(s):
2d2abd6
Update client
Browse files
app.py
CHANGED
@@ -17,8 +17,8 @@ class ChatgptAPI:
|
|
17 |
base_url = "https://api.moonshot.cn/v1",
|
18 |
)
|
19 |
def get_single_round_completion(self, file_path, prompt, conversation):
|
20 |
-
file_object = client.files.create(file=Path(file_path), purpose="file-extract")
|
21 |
-
file_content = client.files.content(file_id=file_object.id).text
|
22 |
messages = [
|
23 |
{
|
24 |
"role": "system",
|
|
|
17 |
base_url = "https://api.moonshot.cn/v1",
|
18 |
)
|
19 |
def get_single_round_completion(self, file_path, prompt, conversation):
|
20 |
+
file_object = self.client.files.create(file=Path(file_path), purpose="file-extract")
|
21 |
+
file_content = self.client.files.content(file_id=file_object.id).text
|
22 |
messages = [
|
23 |
{
|
24 |
"role": "system",
|