Spaces:
Running
Running
Update llama_api.py
Browse files- llama_api.py +2 -2
llama_api.py
CHANGED
|
@@ -53,7 +53,7 @@ client = OpenAI(
|
|
| 53 |
# 🧠 Non-streaming function
|
| 54 |
def ask_ollama(prompt: str):
|
| 55 |
free_models = [
|
| 56 |
-
"
|
| 57 |
]
|
| 58 |
|
| 59 |
last_error = None
|
|
@@ -94,7 +94,7 @@ def ask_ollama(prompt: str):
|
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
-
def ask_ollama_stream(prompt: str, model_name: str = "
|
| 98 |
"""
|
| 99 |
Streams response token-by-token for real-time output.
|
| 100 |
Includes detailed logging for debugging.
|
|
|
|
| 53 |
# 🧠 Non-streaming function
|
| 54 |
def ask_ollama(prompt: str):
|
| 55 |
free_models = [
|
| 56 |
+
"meta-llama/llama-3.1-405b-instruct:free"
|
| 57 |
]
|
| 58 |
|
| 59 |
last_error = None
|
|
|
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
+
def ask_ollama_stream(prompt: str, model_name: str = "meta-llama/llama-3.1-405b-instruct:free"):
|
| 98 |
"""
|
| 99 |
Streams response token-by-token for real-time output.
|
| 100 |
Includes detailed logging for debugging.
|