Update app.py
Browse files
app.py
CHANGED
|
@@ -32,8 +32,10 @@ model_names = [
|
|
| 32 |
def DeepinFra_No_stream(Api:str, messages:list ,model:str = "meta-llama/Meta-Llama-3-70B-Instruct", max_tokens: int = 512, temperature: float = 0.7):
|
| 33 |
|
| 34 |
url = "https://api.deepinfra.com/v1/openai/chat/completions"
|
| 35 |
-
headers ={
|
| 36 |
-
"
|
|
|
|
|
|
|
| 37 |
}
|
| 38 |
|
| 39 |
|
|
@@ -63,7 +65,7 @@ def DeepinFra_stream(Api:str, messages:list ,model: str = "meta-llama/Meta-Llama
|
|
| 63 |
|
| 64 |
url = "https://api.deepinfra.com/v1/openai/chat/completions"
|
| 65 |
headers ={
|
| 66 |
-
"
|
| 67 |
'Content-Type': 'application/json',
|
| 68 |
'Accept': 'text/event-stream',
|
| 69 |
}
|
|
|
|
| 32 |
def DeepinFra_No_stream(Api:str, messages:list ,model:str = "meta-llama/Meta-Llama-3-70B-Instruct", max_tokens: int = 512, temperature: float = 0.7):
|
| 33 |
|
| 34 |
url = "https://api.deepinfra.com/v1/openai/chat/completions"
|
| 35 |
+
headers = {
|
| 36 |
+
"accept": "text/event-stream",
|
| 37 |
+
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
|
| 38 |
+
|
| 39 |
}
|
| 40 |
|
| 41 |
|
|
|
|
| 65 |
|
| 66 |
url = "https://api.deepinfra.com/v1/openai/chat/completions"
|
| 67 |
headers ={
|
| 68 |
+
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
|
| 69 |
'Content-Type': 'application/json',
|
| 70 |
'Accept': 'text/event-stream',
|
| 71 |
}
|