refac: fallback to reasoning content
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run Details
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions Details
Create and publish Docker images with specific build args / build-main-image (linux/amd64, ubuntu-latest) (push) Waiting to run Details
Create and publish Docker images with specific build args / build-main-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run Details
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64, ubuntu-latest) (push) Waiting to run Details
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run Details
Create and publish Docker images with specific build args / build-cuda126-image (linux/amd64, ubuntu-latest) (push) Waiting to run Details
Create and publish Docker images with specific build args / build-cuda126-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run Details
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64, ubuntu-latest) (push) Waiting to run Details
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run Details
Create and publish Docker images with specific build args / build-slim-image (linux/amd64, ubuntu-latest) (push) Waiting to run Details
Create and publish Docker images with specific build args / build-slim-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run Details
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions Details
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions Details
Create and publish Docker images with specific build args / merge-cuda126-images (push) Blocked by required conditions Details
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions Details
Create and publish Docker images with specific build args / merge-slim-images (push) Blocked by required conditions Details
Python CI / Format Backend (3.11.x) (push) Waiting to run Details
Python CI / Format Backend (3.12.x) (push) Waiting to run Details

This commit is contained in:
Timothy Jaeryang Baek 2025-10-07 07:59:21 -05:00
parent 82a16f1305
commit 4bb5b39410
1 changed files with 22 additions and 16 deletions

View File

@ -1490,8 +1490,6 @@ async def process_chat_response(
TASKS.FOLLOW_UP_GENERATION in tasks TASKS.FOLLOW_UP_GENERATION in tasks
and tasks[TASKS.FOLLOW_UP_GENERATION] and tasks[TASKS.FOLLOW_UP_GENERATION]
): ):
print("Generating follow ups")
res = await generate_follow_ups( res = await generate_follow_ups(
request, request,
{ {
@ -1505,10 +1503,12 @@ async def process_chat_response(
if res and isinstance(res, dict): if res and isinstance(res, dict):
if len(res.get("choices", [])) == 1: if len(res.get("choices", [])) == 1:
follow_ups_string = ( response_message = res.get("choices", [])[0].get(
res.get("choices", [])[0] "message", {}
.get("message", {}) )
.get("content", "")
follow_ups_string = response_message.get(
"content", response_message.get("reasoning_content", "")
) )
else: else:
follow_ups_string = "" follow_ups_string = ""
@ -1568,13 +1568,16 @@ async def process_chat_response(
if res and isinstance(res, dict): if res and isinstance(res, dict):
if len(res.get("choices", [])) == 1: if len(res.get("choices", [])) == 1:
title_string = ( response_message = res.get("choices", [])[0].get(
res.get("choices", [])[0] "message", {}
.get("message", {})
.get(
"content",
message.get("content", user_message),
) )
title_string = response_message.get(
"content",
response_message.get(
"reasoning_content",
message.get("content", user_message),
),
) )
else: else:
title_string = "" title_string = ""
@ -1628,10 +1631,13 @@ async def process_chat_response(
if res and isinstance(res, dict): if res and isinstance(res, dict):
if len(res.get("choices", [])) == 1: if len(res.get("choices", [])) == 1:
tags_string = ( response_message = res.get("choices", [])[0].get(
res.get("choices", [])[0] "message", {}
.get("message", {}) )
.get("content", "")
tags_string = response_message.get(
"content",
response_message.get("reasoning_content", ""),
) )
else: else:
tags_string = "" tags_string = ""