Spaces:
Runtime error
Runtime error
Commit
·
98af53d
1
Parent(s):
e612baa
debugging chunks
Browse files- main/main.py +1 -1
- main/routes.py +1 -0
main/main.py
CHANGED
|
@@ -21,7 +21,7 @@ config = load_config()
|
|
| 21 |
def setup_logging():
|
| 22 |
"""Set up basic logging configuration"""
|
| 23 |
logging.basicConfig(
|
| 24 |
-
level=logging.
|
| 25 |
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
| 26 |
)
|
| 27 |
return logging.getLogger(__name__)
|
|
|
|
| 21 |
def setup_logging():
|
| 22 |
"""Set up basic logging configuration"""
|
| 23 |
logging.basicConfig(
|
| 24 |
+
level=logging.DEBUG,
|
| 25 |
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
| 26 |
)
|
| 27 |
return logging.getLogger(__name__)
|
main/routes.py
CHANGED
|
@@ -77,6 +77,7 @@ async def create_chat_completion(request: ChatCompletionRequest):
|
|
| 77 |
# Parse the SSE format from LLM Server
|
| 78 |
if chunk.startswith('data: '):
|
| 79 |
chunk = chunk[6:].strip() # Remove "data: " and trailing \n\n
|
|
|
|
| 80 |
|
| 81 |
if chunk == '[DONE]':
|
| 82 |
continue
|
|
|
|
| 77 |
# Parse the SSE format from LLM Server
|
| 78 |
if chunk.startswith('data: '):
|
| 79 |
chunk = chunk[6:].strip() # Remove "data: " and trailing \n\n
|
| 80 |
+
logger.debug(f"Sending chunk: {chunk}")
|
| 81 |
|
| 82 |
if chunk == '[DONE]':
|
| 83 |
continue
|