Spaces:
Sleeping
Sleeping
Update src/llm_client.py
Browse files- src/llm_client.py +2 -2
src/llm_client.py
CHANGED
|
@@ -14,7 +14,7 @@ def ask_granite(query, context):
|
|
| 14 |
payload = {
|
| 15 |
"text": f"USER QUESTION: {query}\n\nDOCUMENT CONTEXT:\n{context[:6000]}",
|
| 16 |
"persona": "You are a question answering Subject Matter Expert. Answer strictly based on the provided context.",
|
| 17 |
-
"model": "
|
| 18 |
"max_tokens": 5000
|
| 19 |
}
|
| 20 |
|
|
@@ -24,7 +24,7 @@ def ask_granite(query, context):
|
|
| 24 |
}
|
| 25 |
|
| 26 |
try:
|
| 27 |
-
response = requests.post(api_url, json=payload, headers=headers, timeout=
|
| 28 |
if response.status_code == 200:
|
| 29 |
return response.json().get("response", "Error: Empty response.")
|
| 30 |
else:
|
|
|
|
| 14 |
payload = {
|
| 15 |
"text": f"USER QUESTION: {query}\n\nDOCUMENT CONTEXT:\n{context[:6000]}",
|
| 16 |
"persona": "You are a question answering Subject Matter Expert. Answer strictly based on the provided context.",
|
| 17 |
+
"model": "gemma3:latest", # granite4:latest or gemma3:latest
|
| 18 |
"max_tokens": 5000
|
| 19 |
}
|
| 20 |
|
|
|
|
| 24 |
}
|
| 25 |
|
| 26 |
try:
|
| 27 |
+
response = requests.post(api_url, json=payload, headers=headers, timeout=600)
|
| 28 |
if response.status_code == 200:
|
| 29 |
return response.json().get("response", "Error: Empty response.")
|
| 30 |
else:
|