Spaces:
Sleeping
Sleeping
Quincy Hsieh commited on
Commit ·
50775af
1
Parent(s): 929f2ac
Add co2 documentation
Browse files
app.py
CHANGED
|
@@ -432,6 +432,11 @@ async def query_endpoint(request: QueryRequest):
|
|
| 432 |
- sources (list): Source documents used for context
|
| 433 |
- explanation (str): Explanation of the retrieval and answer logic
|
| 434 |
- total_token (int): Total token count from the LLM call
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 435 |
- run_time_in_ms (float): Pipeline execution time in milliseconds
|
| 436 |
"""
|
| 437 |
logger.info(f"Query received: {request.query}")
|
|
|
|
| 432 |
- sources (list): Source documents used for context
|
| 433 |
- explanation (str): Explanation of the retrieval and answer logic
|
| 434 |
- total_token (int): Total token count from the LLM call
|
| 435 |
+
- prompt_tokens (int): Prompt token count
|
| 436 |
+
- completion_tokens (int): Completion token count
|
| 437 |
+
- cached_tokens (int): Cached prompt tokens (when reported by provider)
|
| 438 |
+
- co2_grams (float | None): Estimated CO2 emission in grams (via ecologits)
|
| 439 |
+
- energy_kwh (float | None): Estimated energy use in kWh (via ecologits)
|
| 440 |
- run_time_in_ms (float): Pipeline execution time in milliseconds
|
| 441 |
"""
|
| 442 |
logger.info(f"Query received: {request.query}")
|