Spaces:
Running
Running
[update]add 三国演义.txt
Browse files
main.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
https://huggingface.co/spaces/fffiloni/langchain-chat-with-pdf-openai
|
5 |
"""
|
6 |
import argparse
|
|
|
7 |
import json
|
8 |
import logging
|
9 |
import time
|
@@ -165,6 +166,8 @@ def click_delete_file(openai_api_key: str,
|
|
165 |
result = "success" if assistant_deleted.deleted else "failed"
|
166 |
except openai.NotFoundError as e:
|
167 |
result = e.message
|
|
|
|
|
168 |
return result
|
169 |
|
170 |
|
|
|
4 |
https://huggingface.co/spaces/fffiloni/langchain-chat-with-pdf-openai
|
5 |
"""
|
6 |
import argparse
|
7 |
+
import httpx
|
8 |
import json
|
9 |
import logging
|
10 |
import time
|
|
|
166 |
result = "success" if assistant_deleted.deleted else "failed"
|
167 |
except openai.NotFoundError as e:
|
168 |
result = e.message
|
169 |
+
except httpx.InvalidURL as e:
|
170 |
+
result = str(e)
|
171 |
return result
|
172 |
|
173 |
|