4.8.11 fix (#2822)

* fix: tool choice hostiry error

* fix: chat page auth error redirect

* perf: ip redirect tip

* feat: fedomain env

* fix: tool desc empty

* feat: 4811 doc
This commit is contained in:
Archer
2024-09-27 15:52:33 +08:00
committed by GitHub
parent d259eda6b4
commit 98dbec2cf7
15 changed files with 135 additions and 166 deletions

View File

@@ -127,7 +127,7 @@ export const loadRequestMessages = async ({
})();
// If imgUrl is a local path, load image from local, and set url to base64
if (imgUrl.startsWith('/') || process.env.VISION_FOCUS_BASE64 === 'true') {
if (imgUrl.startsWith('/')) {
addLog.debug('Load image from local server', {
baseUrl: serverRequestBaseUrl,
requestUrl: imgUrl
@@ -234,7 +234,13 @@ export const loadRequestMessages = async ({
}
}
if (item.role === ChatCompletionRequestMessageRoleEnum.Assistant) {
if (item.content !== undefined && !item.content) return;
if (
item.content !== undefined &&
!item.content &&
!item.tool_calls &&
!item.function_call
)
return;
if (Array.isArray(item.content) && item.content.length === 0) return;
}